how to make console execute a command that teleports the specified player I chose to my specified cords

  • 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 community!

    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!

Shap1n

Member
Jan 10, 2025
15
1
3
I am new at skript and cant seem to find anything about how to execute a command from the console so that it teleports the specified player but not me.
 
Code:
execute console command "tp %player% [location]"
This should work but I didn't test it. It might depend on if your using essentials or not
 
Shockfr is correct, but it would flood console if you are using it a lot.
A better solution would be to just use Skript's built in teleport syntax.
Code:
set {_p} to "%player's name%" parsed as player
set {_loc} to location({_x}, {_y}, {_z}) (optional)
teleport {_p} to {_loc} [or location({_x}, {_y}, {_z})]
 
Shockfr is correct, but it would flood console if you are using it a lot.
A better solution would be to just use Skript's built in teleport syntax.
Code:
set {_p} to "%player's name%" parsed as player
set {_loc} to location({_x}, {_y}, {_z}) (optional)
teleport {_p} to {_loc} [or location({_x}, {_y}, {_z})]
Thank you,but wouldnt that teleport the player that used the command? I want it to teleport the player I chose : /toh (player) to the location I set in the skript,when I tried the %player% it just teleports me not the player I specifically chose
 
Code:
command /toh <player>:
    permission: tp.use
    trigger:
        set {_loc} to location(1, 1, 1) # You can choose ur own coords here.
        teleport arg-1 to {_loc}

That should work. I was using the %player's name% as a placeholder for the player you choose.