Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 7 years ago

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

Log in to vote
0
Answered by 7 years ago

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

Ad

Answer this question