Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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?

3 comments

0

Erm, how does the player gain the Infinite money thing? Or is it set by default?

0

you earn money by driving,killing,houses and robbing stores

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,

1 answer

✓ Accepted answer

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.

6 comments

0

what should i use to get unlimited money then?

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.

0

ok i will try that

0

thank you adoman number value worked

0

Yes happy to help :)

0

Hmm this shouldve been downvoted...

This discussion is preserved as it was. New answers, comments, and votes are closed.