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 10 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.

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

Log in to vote
1
Answered by 10 years ago
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)
0
Thanks, that really helped! DapperLink123 30 — 10y
0
You're welcome; could you please accept my answer? :) TheGuyWithAShortName 673 — 10y
Ad

Answer this question