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

How would I make it so it adds when the number is positive but subtract when it's negative?

Asked by
4D_X 118
6 years ago

I tried using some math thingers but nothing would seem to work... Could someone help me a little bit? I know this may seem like a dumb question :) Thx!

    if inc < 0 then
        game.ReplicatedStorage.Core.Temp.Value = game.ReplicatedStorage.Core.Temp.Value - inc
    elseif inc > 0 then
        game.ReplicatedStorage.Core.Temp.Value = game.ReplicatedStorage.Core.Temp.Value + inc
    end
0
1, what if your inc = 0? 2, please, for the love of Jehovah, make game.ReplicatedStorage.Core.Temp.Value into a value :( User#19492 0 — 6y

Answer this question