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

How do we make a limited cash storage function for tycoons?

I know, its the best place to ask this question, but i searched everywhere on roblox, youtube but i never found any way to do this:

make a limited cash storage for tycoons? I'll explain more it will work like that:

If you have a level 1 vault your maximum cash is 500 level 2 - 1500 level 3 - etc...

does anyone have a response?

1 answer

✓ Accepted answer

something like...

if vaultlvl.Value == "1" then
	game.Players.LocalPlayer.maxcash.Value == "500"
elseif vaultlvl.Value == "2" then
	game.Players.LocalPlayer.maxcash.Value == "1500"
end

and then to cap it... ( in the cash value )

script.Parent.Changed:Connect(function()
	if script.Parent.Value > game.Players.LocalPlayer.maxcash.Value then
		script.Parent.Value = game.Players.LocalPlayer.maxcash.Value 
	end
end)

theres not a whole lot to work off of here but that's how I would do it.

3 comments

0

Thank you very much!

0

No problem, thumbs up and accept if it helped please.

0

But, can you explain more cause i just started with a building thats all.

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