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

Script Sequencing, how do I fix? [Closed] [closed]

Asked by 8 years ago

I have a block with 3 scripts in it, labeled A, AA, and AAA I'm trying to program AA so it will not work while A is active, so it's Debounce script will not fire while A is still active

A = script.Parent.A
AA = script
AAA = script.Parent.AAA

local debounce = false --Creates a bool value named debounce
AA.Disabled = false
A.Disabled = false
script.Parent.TopSurface = "Studs"
script.Parent.Touched:connect(function(part) 
    if not debounce then --Only runs if debounce is equal to false
        if A.Disabled = true
        debounce = true --Makes debounce true

What should I do?

Locked by HungryJaffer, LegitimatlyMe, and Redbullusa

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

1 answer

Log in to vote
0
Answered by 8 years ago

Nevermind, I figured it out.

A = script.Parent.A
AA = script
AAA = script.Parent.AAA

local debounce = false --Creates a bool value named debounce
AA.Disabled = false
A.Disabled = true
script.Parent.Touched:connect(function(part) 
    if not debounce then --Only runs if debounce is equal to false
        debounce = true --Makes debounce true
        wait (1)
        AA.Disabled = true
        AAA.Disabled = false
    end
debounce = false --Makes debounce false again so it can run again.
end)

Sorry if someone was coding a solution.

Ad