How do I make this teleport NOT teleport everyone on the server?

I have simple teleport scripts set up that teleport players who interact with a ProximityPrompt to the location of another part. However, it currently teleports everyone on the server. How do I make it so it only teleports the person who interacted with it?

game.Players.PlayerAdded:Connect(function(plr)
		local ProximityPrompt = script.Parent

		ProximityPrompt.Triggered:Connect(function(player)
			local char = player.Character
			char:MoveTo(workspace.spinal.Position)
		end)
	end)		

Try removing the PlayerAdded event.

local ProximityPrompt = script.Parent

ProximityPrompt.Triggered:Connect(function(player)
	local char = player.Character
	char:MoveTo(workspace.spinal.Position)
end)
2 Likes