Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to detect negative values ?

the title is kinda self-explanatory im trying to check a value below 0

i tried: if plr.Data.Karma.Value <= "-150" then (script) end it just... doesnt works also, it works with numbers above zero

2 comments

0

Is Karma an Int/NumValue?

0

Negative values are values which are under 0, so to check if something is negative you can do VALUE < 0 which would be true if the number is a negative number, and false if it is 0 or greater

1 answer

✓ Accepted answer
if plr.Data.Karma.Value < 0 then
 --whatever you want goes here
end

2 comments

0

make sure you are using an IntValue

0

ok that works, thanks

This discussion is preserved as it was. New answers, comments, and votes are closed.