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

How do I make a backpack system?

Asked by 4 years ago

I am trying to make a backpack system that caps the amount of currency I am allowed to have. So, for example, it would be 0/25 or 4/25. I can't seem to figure out what's wrong, I have tried making it so that if my currency goes above 25 then it gets set to 25 but it doesn't seem to be registering that I set it equal to 25. The script I have is

if currency.Value > 25 then

currency.Value = 25

end

Can someone please help me, thanks.

2 answers

Log in to vote
0
Answered by 4 years ago

This is a request. Requests are not allowed on this site.

Ad
Log in to vote
0
Answered by 4 years ago

Make sure you're running your currency check after every instance that the currency amount changes. By itself it will only run once when the script is initially loaded.

Answer this question