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

This teleport script only works in a test world, and not live. Why is that?

Asked by 8 years ago

All of this code is located in a LocalScript in ReplicatedFirst.

01player = game.Players.LocalPlayer
02teleporter = game.Workspace.Projects.Enterance.Teleporter
03torso = player.Character.Torso
04 
05--function (teleport to a brick)
06function Teleport_to_room()
07 
08    --Plays a soundfile located in workspace       
09    teleporter.Part.Teleport_sound:Play()  
10 
11    --Disables the button
12    teleporter.Part.ClickDetector.MaxActivationDistance = 0
13    wait(0.8)          
14 
15    --Teleports the user to the brick's location
View all 24 lines...

Thanks for the help!

0
The problem is you're not waiting for things to load, like objects in workspace or the player's character. OldPalHappy 1477 — 8y
0
How would I go about fixing that? Hyperclux 65 — 8y

Answer this question