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

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

Asked by 7 years ago

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

Log in to vote
2
Answered by 7 years ago

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.

0
Thank you very much! Pizza64X 8 — 7y
0
No problem, thumbs up and accept if it helped please. SchonATL 15 — 7y
0
But, can you explain more cause i just started with a building thats all. Pizza64X 8 — 7y
Ad

Answer this question