1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Teleport player with changed Z-Coordinate

Discussion in 'Skript' started by JX_Snack, Jul 29, 2022.

Thread Status:
Not open for further replies.
  1. JX_Snack

    JX_Snack New Member

    Joined:
    Feb 23, 2022
    Messages:
    5
    Likes Received:
    1
    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 (Text):
    1. command /train_start:
    2.     permission: train.start
    3.     trigger:
    4.         set {_px} to player's x-coord
    5.         set {_py} to player's y-coord
    6.         set {_pz} to player's z-coord
    7.         set {_pz} to {_pz} + 1
    8.  
    9.  
    10.         set {_pw} to player's world
    11.         set {_p} to player's position
    12.  
    13.         set {_pa} to location {_px}, {_py}, {_pz} in world {_pw}
    14.  
    15.         send "Placed train! (%{_pa}%)"
    16.         teleport player to location {_pa}
    --- Double Post Merged, Jul 30, 2022, Original Post Date: Jul 29, 2022 ---
    yeah, imma close this thing and ask on the discord...
    --- Double Post Merged, Jul 30, 2022 ---
    FIXED:

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

Share This Page

Loading...