Hi I made a tp script. It should only tp the person who pressed the button but it teleports everyone in the game.
function onClicked()
local p = game.Players:GetChildren()
for i = 1, #p do
p[i].Character:MoveTo(Vector3.new(-1575.5, -18.75, -1088.5))
end
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
How can I fix this?

1 comment
You are calling everyone in the game with game.Players:GetChildren()