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

I have a brick that once you step on it, it teleport you to the corresponding brick?

Asked by 6 years ago
Edited 6 years ago

The problem is once an explosion happens near it, it stops working. how can i fix this?

--By zamsongod.
--Unlike Clockwork's teleporter, this one teleports ANYTHING not just people!
--Make sure the Part to teleport to is in the same group as this Part.
--Feel FREE to Copy, Abuse and Covet!
local Teleport = "Part1" --Put the name of the Part between the ""s.
function Touch(hit) --Indicates that the Part has been Touched.
    if script.Parent.Locked == false and script.Parent.Parent:findFirstChild(Teleport).Locked == false then script.Parent.Locked = true script.Parent.Parent:findFirstChild(Teleport).Locked = true --Checks Debounce.
    local Pos = script.Parent.Parent:findFirstChild(Teleport) --Gets the Part to teleport to.
        hit.Parent:moveTo(Pos.Position) wait(1) script.Parent.Locked = false script.Parent.Parent:findFirstChild(Teleport).Locked = false end end --Takes you there and Ends the Function.
script.Parent.Touched:connect(Touch) --Listens out for Touchers.
2
Can you please send your code? iiGamer_Master 1 — 6y
0
Would that be because the explosion has gotten rid of the brick? sodaghost1 34 — 6y
0
The brick is still there, the script doesn't work after an explosion QuantumScripter 48 — 6y

Answer this question