function got()
player = script.Parent.Parent.Parent.Parent.Parent
money = player.leaderstats["Money"]
bank = player.leaderstats["BankedMoney"]
withdraw = script.Parent.Parent.MoneyValue
if bank.Value < withdraw.Value or money.Value < withdraw.Value then
script.Parent.Text = "Not Enough Money"
end
end
script.Parent.Value.Changed:connect(got)
If you don't have Enough money i wanna make sure it can't go in Negatives in the Bank. But it Errors.

1 comment
Title your questions appropriately, don't just give us something vague like "Error". Try stating your title as a question.