Solved Teleport player with changed Z-Coordinate

  • 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.

JX_Snack

New Member
Feb 23, 2022
5
1
3
24
Hi! I wanted to teleport the player to a specific coordinate. I wanted to change the Z-Coordinate and then teleport the player to the changed position. Somehow it doesn't work... Does someone know why? Or am I just dumb...

Code:
command /train_start:
    permission: train.start
    trigger:
        set {_px} to player's x-coord
        set {_py} to player's y-coord
        set {_pz} to player's z-coord
        set {_pz} to {_pz} + 1


        set {_pw} to player's world
        set {_p} to player's position

        set {_pa} to location {_px}, {_py}, {_pz} in world {_pw}

        send "Placed train! (%{_pa}%)"
        teleport player to location {_pa}
[doublepost=1659167509,1659116157][/doublepost]yeah, imma close this thing and ask on the discord...
[doublepost=1659167820][/doublepost]FIXED:

Code:
teleport player to player's location ~~ vector(0,0,1)
 
Status
Not open for further replies.