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

Donate cash from ServerStorage not working?

Asked by 8 years ago

Its a custom donate button (Gui) The money system doesnot work with a leaderstats. I really don't know the problem. Money location ServerStorage.MoneyStorage(Player, Name) its a value as playername Whats wrong at this now? Thanks to everyone that helps!

wait(2)

toBox = script.Parent.ToPlayer
amountBox = script.Parent.amount
plr = game.Players.LocalPlayer
yer = game.ServerStorage
tie = plr.Name

script.Parent.Donate.MouseButton1Click:connect(function()
    toName = toBox.Text
    amount = tonumber(amountBox.Text)
    if game.Players:FindFirstChild(toName) then
        yer:FindFirstChild(toName)
        if plr.tie.Value>=amount and amount>0 and amount<1001 then
            plr.tie.Value = plr.tie.Value-amount
            yer.tie.Value = yer.tie.Value+amount
        end
    end 
end)
0
Are you using Berezaa's tycoon kit? (Guessing from the whole ServerStorage.MoneyStorage) NinjoOnline 1146 — 8y
0
yes minetrackmania 186 — 8y
0
Are their any errors in your script? NinjoOnline 1146 — 8y

Answer this question