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

How Do I Make A Teleporter Stop For 5 Seconds?

Asked by 11 years ago

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.

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

1 answer

Log in to vote
1
Answered by 11 years ago
1Ting = 0
2script.Parent.Touched:connect(function(p)
3if p.Parent:findFirstChild("Torso") and Ting == 0 then
4Ting = 1
5p.Parent.Torso.CFrame = script.Parent.Parent["2"].CFrame + Vector3.new(0,5,0)
6wait(5)
7Ting = 0
8end
9end)
0
Thanks, that really helped! DapperLink123 30 — 11y
0
You're welcome; could you please accept my answer? :) TheGuyWithAShortName 673 — 11y
Ad

Answer this question