Save location per world

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

ficusulmic

Member
Dec 17, 2023
1
0
1
Hi so i am making someone a skript so when they rtp they will do it to a specific world but i dont know how to make it so the survival world when they will tp back lets say /backtoworld to get teleported to the exact location something like

YAML:
on quit:
    set {LastLocation.%player%} to location of player

on join:
    teleport player to {LastLocation.%player%
}

but i dont know how to make it per world and i dont want to use 2 different skripts
 
Code:
command peepee:
    trigger:
        set {pepeloc::%player's uuid%} to location of player
        teleport player to {peepeeloc::%player's uuid%}
        
command pepe:
    trigger:
        set {peepeeloc::%player's uuid%} to location of player
        teleport player to {pepeloc::%player's uuid%}