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

[FIXED] Why does my NumberValue keep going down even tho a value is false?

Asked by 4 years ago
Edited 4 years ago

I have been stuck on this problem for a couple of hours now, and I don't know how to fix it. My NumberValue is supposed to stop going down but it just continues to go down even tho a BoolValue is set to false.

while wait() do
if game.ReplicatedStorage.ClickedPlay.Value == true then
    script.Parent.Visible = true
    break
end
end

while wait(1.5) do
    if game.ReplicatedStorage.IsOn2.Value == true then
    game.ReplicatedStorage.Battery.Value = game.ReplicatedStorage.Battery.Value - 1
    end
    end

Please help.

1 answer

Log in to vote
0
Answered by 4 years ago

Oh, I fixed it myself... I used localscripts instead of scripts...

Ad

Answer this question