lmao how does this have 6+ upvotes wtf 8 upvotes you guys have aids
here's the script
while wait(1) do local OrderNumber = script.Parent if OrderNumber.Order2Handler.Visible == true then OrderNumber.Order1Handler.Visible = true if OrderNumber.Order3Handler.Visible == true then OrderNumber.Order1Handler.Visible = true OrderNumber.Order2Handler.Visible = true if OrderNumber.Order4Handler.Visible == true then OrderNumber.Order1Handler.Visible = true OrderNumber.Order2Handler.Visible = true OrderNumber.Order3Handler.Visible = true if OrderNumber.Order5Handler.Visible == true then OrderNumber.Order1Handler.Visible = true OrderNumber.Order2Handler.Visible = true OrderNumber.Order3Handler.Visible = true OrderNumber.Order4Handler.Visible = true end end end end end
it didnt work. help?
This is a working local script inside the gui.
while wait(1) do local OrderNumber = script.Parent if OrderNumber.Order2Handler.Visible == true then OrderNumber.Order1Handler.Visible = true end if OrderNumber.Order3Handler.Visible == true then OrderNumber.Order1Handler.Visible = true OrderNumber.Order2Handler.Visible = true end if OrderNumber.Order4Handler.Visible == true then OrderNumber.Order1Handler.Visible = true OrderNumber.Order2Handler.Visible = true OrderNumber.Order3Handler.Visible = true end if OrderNumber.Order5Handler.Visible == true then OrderNumber.Order1Handler.Visible = true OrderNumber.Order2Handler.Visible = true OrderNumber.Order3Handler.Visible = true OrderNumber.Order4Handler.Visible = true end end
Why your script didn't work
while wait(1) do local OrderNumber = script.Parent if OrderNumber.Order2Handler.Visible == true then OrderNumber.Order1Handler.Visible = true if OrderNumber.Order3Handler.Visible == true then OrderNumber.Order1Handler.Visible = true OrderNumber.Order2Handler.Visible = true if OrderNumber.Order4Handler.Visible == true then OrderNumber.Order1Handler.Visible = true OrderNumber.Order2Handler.Visible = true OrderNumber.Order3Handler.Visible = true if OrderNumber.Order5Handler.Visible == true then OrderNumber.Order1Handler.Visible = true OrderNumber.Order2Handler.Visible = true OrderNumber.Order3Handler.Visible = true OrderNumber.Order4Handler.Visible = true end end end end end
So you have if statements inside other if statements. That's called nesting. Here if the first if statement passes then it will set the value to true and check the second if statement and so on; but if it doesn't pass , it won't check the other if statements, which I guess is bad.
In the working script, if the first if statement passes then it will set the value to true and then check the 2nd if statement and so on. If it doesn't pass it will still check the 2nd if statement. The same thing happens with the 2nd if statement.