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)