That will produce the same result as += 1, it’s possible the original poster when changing the fix you suggested ended up changing some other code which resulted in it working. You’re right though, the thread has been resolved so there’s not much point in replying anymore.
Actually you just can’t do the comparison operators on strings and numbers together due to how the metamethods work.
You can “do math” (+, -, *, /, ^, %) on strings because of how metamethods for these operations are implemented.
local a = "10"
print(a + 1, a - 1, a * 2, a / 2, a^2, a % 3)
And that also is very possible. I do wonder why they chose plr.leaderstats[currency]
instead of plr.leaderstats.currency
.
They might have multiple types of currency, where currency
is a variable of which currency is being used to purchase the item.
1 Like
Okay! Thank you, have a great day/night.