TELEPORTER 2 SCRIPT:
db = false
script.Parent.Touched:connect(function(tch)
if db == true then return end
db = true
local trs = tch.Parent:FindFirstChild("Torso")
local lrm = tch.Parent:FindFirstChild("Left Arm")
local rrm = tch.Parent:FindFirstChild("Right Arm")
local lg = tch.Parent:FindFirstChild("Left Leg")
local rg = tch.Parent:FindFirstChild("Right Leg")
local hd = tch.Parent:FindFirstChild("Head")
if trs ~= nil and lrm ~= nil and rrm ~= nil and lg ~= nil and rg ~= nil and hd ~= nil then
tch.Parent:MoveTo(script.Parent.Parent.TP1.Position)
wait(2)
db = false
end
end)
TELEPORTER 1 SCRIPT:
db = false
script.Parent.Touched:connect(function(tch)
if db == true then return end
db = true
local trs = tch.Parent:FindFirstChild("Torso")
local lrm = tch.Parent:FindFirstChild("Left Arm")
local rrm = tch.Parent:FindFirstChild("Right Arm")
local lg = tch.Parent:FindFirstChild("Left Leg")
local rg = tch.Parent:FindFirstChild("Right Leg")
local hd = tch.Parent:FindFirstChild("Head")
if trs ~= nil and lrm ~= nil and rrm ~= nil and lg ~= nil and rg ~= nil and hd ~= nil then
tch.Parent:MoveTo(script.Parent.Parent.TP1.Position)
wait(2)
db = false
end
end)
This is related to my last post, about when players die when they teleport. Now I have another problem, when I tried to give it a debounce. The problem is the player teleports from one teleporter to the other, then back to the original one. After that is when the debounce works. I want the debounce to work after you teleport once, from the touched teleporter to the other one.
