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

How to detect negative values ?

Asked by 3 years ago
Edited 3 years ago

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

0
Is Karma an Int/NumValue? deeskaalstickman649 475 — 3y
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 0Shank 0 — 3y

1 answer

Log in to vote
0
Answered by
valk_3D 140
3 years ago
if plr.Data.Karma.Value < 0 then
 --whatever you want goes here
end
0
make sure you are using an IntValue valk_3D 140 — 3y
0
ok that works, thanks MacGames007 114 — 3y
Ad

Answer this question