i am using a click teleporter in my game but when i test it it teleports all the players instead of the one who clicked on it and i don't know why.
Here is the script: function onClicked()
local c = game.Players:GetChildren() for i = 1, #c do c[i].Character.UpperTorso.CFrame = CFrame.new(script.Parent.Parent.Teleport22.Position)--change "teleport" to the name of the object you want to be teled to... end
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
Tell me what to do to fix this please. Thank you

6 comments
that does not work. i put a script inside the part i am clicking on with that exact script but changed the partyouwanttoteleportto to my part and nothing happend. still does not work
Try now
nope still nothing
Alright, where is your part, script and everything else located
the part you click on is located in workspace inside a model the part im tping to is in the same model as the part you click to tp. the script is inside the part you click to tp along with a click detector.
wait im dumb i just needed to ungroup them