Here is the output: 12:41:21.126 - Players.tyorange09.PlayerGui.Withdraw.Bank.TextButton.LocalScript:7: attempt to compare string and number

Here is my code (Local Script): script.Parent.MouseButton1Click:Connect(function() local player = game.Players.LocalPlayer local CashAmount = script.Parent.Parent.TextButton.Text

if player.Pstats.Bank.Value > CashAmount then

	player.Pstats.Bank.Value = player.Pstats.BankCash.Value - CashAmount

	player.Pstats.Cash.Value = player.Pstats.Cash.Value + CashAmount

	script.Parent.Parent.Visible = false

end

if player.Pstats.BankCash.Value < CashAmount then

	script.Parent.Parent.TextBox.Text = "Incuficent Balance!"

	script.Parent.Parent.TextBox.BackgroundColor3 = "#ff0000"


end

end)

3 comments

0

script.Parent.MouseButton1Click:Connect(function() local player = game.Players.LocalPlayer local CashAmount = script.Parent.Parent.TextButton.Text if player.Pstats.Bank.Value > CashAmount then player.Pstats.Bank.Value = player.Pstats.BankCash.Value - CashAmount player.Pstats.Cash.Value = player.Pstats.Cash.Value + CashAmount script.Parent.Parent.Visible = false end if player.Pstats

0

Bank.Value > tonumber(CashAmount)

0

ok thx