Well Can You Help Me Why This wont Work ?
This The Script ,
Its' On starter gui , Screen Gui , Script
if script.Parent.Parent.Parent.leaderstats.Cash.Value == -2147483648 then
script.Parent.Parent.Parent.leaderstats.Cash.Value = 250000000
end
Well Can You Help Me Why This wont Work ?
This The Script ,
Its' On starter gui , Screen Gui , Script
if script.Parent.Parent.Parent.leaderstats.Cash.Value == -2147483648 then
script.Parent.Parent.Parent.leaderstats.Cash.Value = 250000000
end
-snip-
If you want to check if a number is negative, check if it is less than 0:
if script.Parent.Parent.Parent.leaderstats.Cash.Value < 0 then
script.Parent.Parent.Parent.leaderstats.Cash.Value = 2147483647 --You were right about that being too big, by the way.
end
Honestly, though, you should just use sane values so you don't have to deal with integer wrapping, or just use Strings.
Normal scripts do run in the PlayerGui. (just verified to be sure)
Weird. Every time I've tried they haven't worked. Ah well. (People still should use LocalScripts in the PlayerGui, though)
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
Theres nothing wrong with that bit of code, but how you use it may effect something. And why such a specific number? Elaborate the question a bit. Include more of the script please.
Actually, 250000000 might be too high.