of     1   

Mezur
#182597749Friday, January 29, 2016 4:17 AM GMT

How do I make this script make it so you can only have a certain amount of "Gold". For example I want it so you can only have 10 gold and nothing above that. while true do script.Parent.Text = "Gold: " .. math.floor(script.Parent.Parent.Parent.Parent.Parent.leaderstats.Gold.Value) wait(0) end
Mezur
#182597877Friday, January 29, 2016 4:20 AM GMT

b1
Hedr0n
#182597963Friday, January 29, 2016 4:21 AM GMT

math.min(MaxGold, CurrentGols) Pretty much the equivalent of: if Current > Max then return max else return Current end
ParadigmaticAnon
#182597970Friday, January 29, 2016 4:21 AM GMT

A conditional statement would allow you to accomplish this. Presumably, you could create an algorithm such as this: function Check_Gold() Gold = 1; Maximum_Number = 10; if(Gold < Maximum_Num)then Gold = Gold + 1; Increases the value if the variable "Gold" is lesser than the limit; else print("You have reached the gold limitation!"); Event:connect(Check_Gold);
Hedr0n
#182598020Friday, January 29, 2016 4:22 AM GMT

Hop off my block anon
Mezur
#182598259Friday, January 29, 2016 4:25 AM GMT

So do I replace my script with that? Because I just did that and it does not work. Where do I insert that script at? Thanks for helping me btw.
Mezur
#182598409Friday, January 29, 2016 4:27 AM GMT

b2
ParadigmaticAnon
#182598438Friday, January 29, 2016 4:28 AM GMT

"Hop off my block anon" Yes, it appears that I did not recognize the explicit flaw of defining the variables within the scope of the function. Oh well, I suppose that you can handle the onward explanation.
Mezur
#182598482Friday, January 29, 2016 4:29 AM GMT

help meh pls para
Hedr0n
#182598547Friday, January 29, 2016 4:30 AM GMT

I hope you can't get a job because you try to talk like your smart. Smart people are lazy And lazy people use built-ins

    of     1