teleport all players in a world to coordinates in that 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 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!

xiliry3

Member
Apr 11, 2024
2
0
1
24
i have a server with multiple worlds and one of them is WildKitzX (randomkits) since the map gets destroyed every time i made a skript that resets the arena through console commands that execute a plugin (mineresetlite) players get teleported to spawn before the reset, now i made a survival world and you still get the message and get teleported. i did not find an solution so im now hoping to find answers here.
Screenshot 2024-04-11 180303.png
 
Guten Tag!

The broadcast expression sends the message to EVERY player on the server. Furthermore, teleport all players does exactly what you'd expect, it teleports all connected players. To fix this, try using filters, which are basically if statements but they can work inside of one line and work in periodical events, they simply filter out all players who, for example, aren't inside of the mining world.

Simply replace "<InsertWorldName>" with the world name (I think its "Arena") and replace "<InsertTextHere>" with the message you want to be sent
AppleScript:
send "<InsertTextHere>" to all players where ["%input's world%" contains "<InsertWorldName>"]
teleport all players where ["%input's world%" contains "<InsertWorldName>"]  to location(77.5, -1, 165.5, world "<InsertWorldName>")
 
Last edited:
Guten Tag!

The broadcast expression sends the message to EVERY player on the server. Furthermore, teleport all players does exactly what you'd expect, it teleports all connected players. To fix this, try using filters, which are basically if statements but they can work inside of one line and work in periodical events, they simply filter out all players who, for example, aren't inside of the mining world.

Simply replace "<InsertWorldName>" with the world name (I think its "Arena") and replace "<InsertTextHere>" with the message you want to be sent
AppleScript:
send "<InsertTextHere>" to all players where ["%input's world%" contains "<InsertWorldName>"]
teleport all players where ["%input's world%" contains "<InsertWorldName>"]  to location(77.5, -1, 165.5, world "<InsertWorldName>")
thank you for this reply but what is with %input's world% what does it do?
 
Input in a filter refers to the thing being filtered, so if input is all players, it's going to check the filter against every player.

"%input's world%" (stringified just in case) will check the name of the world every player is in, and if that name contains the world name you specified, do the teleporting and messaging