delete player's vehicle

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Leonardo_

Member
Sep 21, 2020
18
0
1
24
Hi, I wanted to know how to delete the player vehicle. I made a skript that to hide the nametag by putting an armorstand that rides the player. I would like to make sure that when the target of the player is a player, it eliminates the armostand of the target in order to make the nametag of the viewer visible.
 
I am pretty certain that a "vehicle" of a player in Minecraft (boat, minecart, armorstand) is actually an entity, so it should be that:
Code:
loop all entities in radius 1 of player:
  execute console command "kill %loop-entity"
  exit loop
haven't tested it so I don't promise it works.
 
I am pretty certain that a "vehicle" of a player in Minecraft (boat, minecart, armorstand) is actually an entity, so it should be that:
Code:
loop all entities in radius 1 of player:
  execute console command "kill %loop-entity"
  exit loop
haven't tested it so I don't promise it works.
It doesn't work


Code:
every 5 ticks in "world":
    loop all players:
        if loop-player's targeted entity is a player:
            loop all armor stands in radius 1 of player:
                execute console command "kill %loop-entity-2%"
                exit loop
 
It doesn't work


Code:
every 5 ticks in "world":
    loop all players:
        if loop-player's targeted entity is a player:
            loop all armor stands in radius 1 of player:
                execute console command "kill %loop-entity-2%"
                exit loop
I'm not a skript export & also doing every 5 ticks is not gonna be healthy to your server TPS.
I don't know anything I tried to help but idk... try doing kill entity in raidius 1 of player
 
Status
Not open for further replies.