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

How Do I Make A Teleporter Stop For 5 Seconds?

I made a set of teleporting blocks, and I tested them out, but the teleporter kept going and wouldn't let me move off of the other. Here's ones' code.

Ting = 0
script.Parent.Touched:connect(function(p)
if p.Parent:findFirstChild("Torso") and Ting == 0 then
Ting = 1
p.Parent.Torso.CFrame = script.Parent.Parent["2"].CFrame + Vector3.new(0,5,0)
Ting = 0
end
end)

1 answer

✓ Accepted answer
Ting = 0
script.Parent.Touched:connect(function(p)
if p.Parent:findFirstChild("Torso") and Ting == 0 then
Ting = 1
p.Parent.Torso.CFrame = script.Parent.Parent["2"].CFrame + Vector3.new(0,5,0)
wait(5)
Ting = 0
end
end)

2 comments

0

Thanks, that really helped!

0

You're welcome; could you please accept my answer? :)

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