Teleport to last log off location

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

AngerYT

Member
Jan 18, 2022
12
3
3
23
im making something that if u join u need to wait and after it will teleport to last log off location but how?
 
Theres an event called on disconnect, if you save the location of the player in a variable such as {location::%player's uuid%} when they log off,
then when they log back on (on join event), you can teleport them to that variable.

Example:

Code:
on disconnect:
    set {location::%player's uuid%} to player's location
on join:
    teleport player to {location::%player's uuid%}
 
Theres an event called on disconnect, if you save the location of the player in a variable such as {location::%player's uuid%} when they log off,
then when they log back on (on join event), you can teleport them to that variable.

Example:

Code:
on disconnect:
    set {location::%player's uuid%} to player's location
on join:
    teleport player to {location::%player's uuid%}

THANKS! You are my live savior
 
Status
Not open for further replies.