Any help with splitting this script into 2?

Oops, that was probably the nil value. I’ll edit my post. Thanks!

Also I’d recommend on the servers end, using math.abs(rcash); that way you’ll prevent some exploiter from firing the remote using a negative value as you should be subtracting said value from the player’s current total if I’m not misunderstanding the purpose of the cash tool.

1 Like

This "if tonumber(setter.Text) and to tonumber(setter.Text) % 1 == 0 and to " is giving me an error.

remote = game:GetService("ReplicatedStorage"):WaitForChild("Remote")

remote.OnServerEvent:Connect(function(player,rcash)

This is easier on people’s eyes. And Make sure there is a RemoteEvent inside ReplicatedStorage

image

I fixed that as well. Sorry
30Char

If you’re still having issues, feel free to add me to Team Create and I’ll try and fix it for you (if you want to).

1 Like

That would help me out a lot, I will add you right now.

tonumber never errors, why would you pcall it?

1 Like