I am making a cashapp system, so you can transfer money to other players. I am using a textbox so they can input the amount of money they would like to send. But it won’t work.
Local script:
game.ReplicatedStorage.transferCash:FireServer(script.Parent.Parent.amountBox.Text, script.Parent.Parent.usernameBox.Text)
Server script:
game.ReplicatedStorage.transferCash.OnServerEvent:Connect(function(plr, amount, target)
if plr.leaderstats.Cash.Value >= amount then
plr.leaderstats.Cash.Value -= amount
game.Players:FindFirstChild(target).leaderstats.Cash.Value += amount
end
end)
Error:
ServerScriptService.iMessagesHandler:6: attempt to compare string <= number - Server - iMessagesHandler:6