while BatteryLeft.Value <= 100 and BatteryLeft.Value > 0 do game.Players[player.Name].PlayerGui.Battery.Frame.Bar1.Visible = false wait(1) game.Players[player.Name].PlayerGui.Battery.Frame.Bar1.Visible = true end
BatteryLeft.Value does go below 100 but the while loop never runs. This happens all the time when I use a while loop xD
Can someone help?
I might sound like I don't know that much about scripting here but whenever I use while loops nothing happens. Unless it is because BatterLeft is an unknown variable to it because you did not do BatteryLeft =, I would reccoment doing this:
while true do if BatteryLeft.Value<=100 and BatteryLeft.Value>0 then game.Players[player.Name].PlayerGui.Battery.Frame.Bar1.Visible = false wait(1) game.Players[player.Name].PlayerGui.Battery.Frame.Bar1.Visible = true end wait(1) end