Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

My teleportation script works for only one player, what am I doing wrong?

Okay, so my script works now after a little bit of testing, however; it only works for one player, when another player enters the world, the script does not work for that player. But it does work for me (until I die).

wait(60)

	
player = game.Players.LocalPlayer
teleporter = game.Workspace.Projects.Enterance.Teleporter
torso = player.Character.Torso



function Teleport_to_room()		
	teleporter.Part.Teleport_sound:Play()	
	teleporter.Part.ClickDetector.MaxActivationDistance = 0
	wait(0.8)			
	torso.CFrame = game.Workspace.Teleport_test.CFrame	
	teleporter.Part.ClickDetector.MaxActivationDistance = 16

	
end	


game.Workspace.Projects.Enterance.Teleporter.Part.ClickDetector.MouseClick:connect(Teleport_to_room)


1 answer

Open Explorer and put the script in StarterPlayer > StarterPlayerScripts or StarterCharacterScripts, not really sure if that will help.

This discussion is preserved as it was. New answers, comments, and votes are closed.