function onClicked() local c = game.Players:GetChildren() for i = 1, #c do c[i].Character.UpperTorso.CFrame = CFrame.new(script.Parent.Parent.L8.Position) end script.Parent.ClickDetector.MouseClick:connect(onClicked)
L8 is a part name in my game. When one player clicks on the teleport pad it teleports everyone ingame to L8 (the part) when we only want the person who clicks it to teleport. It's a two-way teleporting system and the parts are contained within a model.
While what SuperMario9595 said was correct, I will go more into detail as to why it is happening.
In your for loop, it is going through all the children of Players individually, so it will teleport all the players in the game to that location. You can fix this by finding the single player that has clicked on the clickdetector by following SuperMario9595's answer.
script.Parent.ClickDetector.MouseClick:connect(function(player) player.Character:MoveTo(script.Parent.Parent.L8.Position) end)
The above should work.
MouseClick has a way to know what player clicked it, so you can use that.
local function onClicked(playerWhoClicked) playerWhoClicked.Character.UpperTorso.CFrame = CFrame.new(script.Parent.Parent.L8.Position) end script.Parent.ClickDetector.MouseClick:connect(onClicked)