Make player teleport backwards every 2 seconds

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

Status
Not open for further replies.

Stefqnutz

Active Member
Sep 23, 2019
67
1
8
Im trying to code something, anyways I need it so that every 2 seconds the player will teleport backwards.
 
This could work, but there could also be better ways to make it:
Code:
every 2 seconds:
    loop all players:
        set {_block} to block 2 behind loop-player
        teleport the loop-player to {_block}
 
This would be better since it won't teleport you upwards:
Code:
every 2 seconds:
    loop all players:
        set {_block} to the block 2 horizontal behind the loop-player
        teleport the loop-player to {_block}

or you could use this one, which will keep the exact height (y coordinate) of the player. So it won't make you jump on teleport:
Code:
every 2 seconds:
    loop all players:
        set {_loc} to location of the block 2 horizontal behind the loop-player
        set y coordinate of {_loc} to y coordinate of loop-player
        teleport the loop-player to {_loc}
 
Last edited:
Status
Not open for further replies.