I have a teleporting script and a part that detects if it got touched by a player and teleports the player that touched it. But it's not working as it's supposed to. It's teleporting ALL players. Even players that hasn't even touched it.
The script looks something like this but it's not the real script.
part.Touched:Connect(function(p)
local plr = game.Players:GetPlayerFromCharacter(p.Parent)
if plr ~= nil then
player.Character.Humanoid.Torso.CFrame = CFrame.new(206.25, -159.5, -1833)
end
end)

5 comments
We cannot answer a question if you do not give us the full script, also I don't think touched works in a local script and it sure doesn't work if it's inside the workspace and a local script
There isn't much to the script other than this part.
you don't have the 'teleport' code? thats where the problem occurs.
Ok I added the teleport code.
ok try my answer out