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

someone correct my debounce please... (?)

Asked by
0msh 333 Moderation Voter
6 years ago
local d = false
script.Parent.MouseButton1Down:Connect(function()
    local h = script.Parent.Parent.Parent.Parent.Parent.Character:FindFirstChild("Torso")
    local s = game.Workspace.ToSpawn
if d == false then
    d = true    
    h.CFrame = s.CFrame
    for i = 30,0,-1 do
        script.Parent.Text = i
        wait(1)
        if i >= 0 then
            script.Parent.Text = "Teleport to Spawn"
            d = false
        end
    end
    end
end)

0
You sould make sure the local h connects with the script.Parent.Parent.Parent, basically that whole line powerdud -5 — 6y
0
what...? That's not the problem... the problem is the debounce is not working 0msh 333 — 6y
1
put your d = false from line 13 to line 16 RubenKan 3615 — 6y
0
alrigth thanks 0msh 333 — 6y

Answer this question