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

Is there a way to increase limit on how much a player earns?

Asked by
Benqazx 108
8 years ago
print("Cash Stuffs running!")

function onPlayerEntered(newPlayer)
    wait(.5)
    local stats = Instance.new("IntValue")
    stats.Name = "leaderstats"

    local cash = Instance.new("IntValue")

    cash.Name = "Money"
    cash.Value = 1000 --This sets the amount of money every player starts with

    cash.Parent = stats
    stats.Parent = newPlayer
end

game.Players.ChildAdded:connect(onPlayerEntered)

my game is a car game and i am trying to make a leaderboard that allows player to have unlimited money but the leaderboard above that i made only allows people to have 2.1 billion if they cross that it players money will go negative. is there a way to let play have unlimited money?

0
Erm, how does the player gain the Infinite money thing? Or is it set by default? CrammelApple 50 — 8y
0
you earn money by driving,killing,houses and robbing stores Benqazx 108 — 8y
0
Well, you could make a maximum, and once the players have maximum currency, there could be a bank system, where you could hold extra money, CrammelApple 50 — 8y

1 answer

Log in to vote
1
Answered by 8 years ago

An Integer's max value is 2,147,483,647; Therefore using an integer in your leaderstats, you will get this number as your highest.

0
what should i use to get unlimited money then? Benqazx 108 — 8y
0
I would try out the Number value instead of the Int Value to see if that has a higher maximum top. The Int Value is 32 bit and the number is 64 bit for it's abilities to store decimals, you can find out if it can also store more than an Int though. adoScripting 0 — 8y
0
ok i will try that Benqazx 108 — 8y
0
thank you adoman number value worked Benqazx 108 — 8y
View all comments (2 more)
0
Yes happy to help :) adoScripting 0 — 8y
0
Hmm this shouldve been downvoted... LateralLace 297 — 8y
Ad

Answer this question