I want to create a button that when someone presses, all players are teleported to the x, y, z area the problem is that this script teleports the player that clicked first and only after a few seconds, other players (tested on LocalServer in Roblox Studio
script:
local teleporte = script.Parent
function onClicked()
local p = game.Players:GetChildren()
for i = 1, #p do
p[i].Character:MoveTo(Vector3.new(-55.831, 11.008, 183.894))
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)

3 comments
interesting guy, I'll try, thanks
He probably forgot an end
oh he did. I didn't notice that yesterday