New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
Still have questions? Join our Discord server and get real time help.
Log in to vote

How do I change the value of this?

Asked by 14 days ago
Edited 14 days ago

I need to change the value of money in a script. This is what i've thought of

local Money = Player:WaitForChild("leaderstats").Money

1 answer

Log in to vote
Answered by
Nanomatics 1107 Moderation Voter
14 days ago

I am assuming this is an IntValue/NumberValue

You can do

local Money = Player:WaitForChild("leaderstats").Money
Money.Value = 15 -- will change the value to 15
--To add to the current value do
Money.Value = Money.Value + 15 -- adds 15 to current value

Hope I helped, if you have any questions please let me know!


Answer this question