i have a gas mask gui i want to appear when you equip a tool. I have that set up. However, I am also making a bar appear when you equip the tool and when the bar is completely filled up, the gui will appear on your screen. here is my code:
if script.Parent.Parent.bool == true then
while true do
wait(0.25)
MeterA = MeterA + 1
if MeterLocation:FindFirstChild("Meter"..MeterB) then
MeterLocation["Meter"..MeterB].ImageTransparency = 0
MeterB = MeterB - 1
end
if MeterA == 19 then
script.Parent.Visible = false
MeterA = 0
MeterB = 19
end
end
end
see, the code works fine UNTIL I add the if statement, even if the value is true. there are no errors in output. Help would be helpful

1 comment
bool is a boolvalue btw\