So I added a part where it would check which player clicks it but that hasn't any effect
function onClicked()
local c = game.Players:GetChildren() -- I think its here where it goes wrong
for i = 1, #c do
c[i].Character.Torso.CFrame = CFrame.new(script.Parent.Parent.TP99.Position)--Name of object where u get tpd to
end
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
function onClicked(player) -- but I added this so it would tp the person who clicks it but it still teleports all
player.Character.Torso.CFrame = CFrame.new(script.Parent.Parent.TP99.Position)
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)

2 comments
The first function loops through the c table(which is a table of all players in the game) and teleports everyone in that table. Remove that function. The second function looks to work
use game.Players:GetPlayers()