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

How to Teleport Player Back to Place?

I tried to teleport the player back to the other place, but it won't work. This is a local script located in the StarterGUI. Any help?

while true do
print("Sound is Playing")
script.Parent.Credit:Play()
wait(100)
script.Parent.Credit.Volume = 0.4
wait(0.5)
script.Parent.Credit.Volume = 0.3
wait(0.5)
script.Parent.Credit.Volume = 0.2
wait(0.5)
script.Parent.Credit.Volume = 0.1
wait(0.5)
script.Parent.Credit.Volume = 0
wait(5)
print("Did it Send You Back?")
game:Service("TeleportService"):Teleport(42860954)
wait(10)
script.Parent.Credit:Destroy()
wait(10)
end

1 answer

✓ Accepted answer

May I ask why this is in a loop?

--I'll assume this is in a GUI in starter GUI.
--Put this in a local script
local Player = game.Players.LocalPlayer
while true do
print("Sound is Playing")
script.Parent.Credit:Play()
wait(100)
for i=1,5 do --Use a For Do loop, to shorten the script, and save time while scripting.
script.Parent.Credit.Volume = (script.Parent.Credit.Volume - 0.1)
wait(0.5)
end
game:Service("TeleportService"):Teleport(42860954, Player) --It has to know WHO to teleport.
wait(10)
script.Parent.Credit:Destroy()
wait(10)
end

2 comments

0

Thank you!

0

No problem.

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