Advertisement
IxCreativeXL

Teleport all - Roblox LUA Scripting

Jun 16th, 2020
5,347
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1. function teleAll(x, y, z) -- Teleports everyone to the position given
  2.     local pos = Vector3.new(x, y, z) -- Finds position of the target for everyone to go to.
  3.     for _, plr in pairs(game:GetService("Players"):GetPlayers()) do
  4.         if plr.Character then -- If character is not a real player, then don't teleport that character.
  5.             plr.Character:MoveTo(pos) -- Places all players in the position provided.
  6.         end
  7.     end
  8. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement