The title explains literally everything.
Here are my scripts:
Here is where I set the 'pricer' var.
LOCAL SCRIPT:
pricer = 20000
LOCAL SCRIPT:
game.ReplicatedStorage.IntPurcEvent:FireServer(player, pricer)
SCRIPT:
rs.IntPurcEvent.OnServerEvent:Connect(function(player, pricer) player.leaderstats.Money.Value = player.leaderstats.Money.Value - pricer end)
ERROR I RECEIVE IN CONSOLE:
18:58:35.796 - Workspace.ClientReqScript:35: attempt to perform arithmetic on local 'pricer' (a userdata value)
Thanks for any help!
EDITS:
I WILL NOT DO THIS:
player.leaderstats.Money.Value = player.leaderstats.Money.Value - 20000
BECAUSE PRICER CAN BE MULTIPLE VALUES
Remove the first parameter ('player') when firing the event. When using FireServer in a localscript, your player get's automatically passed in as the first argument, so what you're doing is making the second argument (Which is supposed to be price.) the player again.
I think this is the problem:
local pricer.Value = 20000
That should work. I think you attempted to call an int value, not the actual value of it.