Log in to vote

Can you help me with finding a variable?

Asked by 1 year ago

**I found this script for a money stat but I do not know the variable to increase or decrease the value of money, here is the script: **

print("Cash Leaderboard Loaded")

function onPlayerEntered(newPlayer)

    stats ="IntValue")
    stats.Name = "leaderstats"

    cash ="IntValue")
    cash.Name = "Money"       --name of currency (e.g. cash, money, resources, bucks, etc.)
    cash.Value = 1000      --starting money.

    cash.Parent = stats
    stats.Parent = newPlayer



Looks like you're using an ad blocker.

That's fine...

No, it really is.

Just, I mean, we put a lot of work into this site, you know?

It would be really really appreciated if you would turn off your ad blocker for our website...

We tried really hard to make our ads as unobtrusive as possible.

If you really hate ads, would you consider a $2 donation via Patreon?

Here's the link.

We love you. We hope you love us too.




Now back to your regularly scheduled Scripting Helpers....




1 answer

Log in to vote
Answered by
Cuvette 222
1 year ago

If you want to increase it in the same script use

Cash.Value = Cash.value + 10

Or whatever number you choose


Answer this question