script.Parent.Touched:Connect(function(hit)
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
local cash = plr.leaderstats.Cash
cash.Value = cash.Value +5
R:FireAllClients()
print('Recived')
end)
---This part it is in Replicated storage, I made a script that when you click a part, the part in replicated storage (this one) duplicates and goes to Workspace and when a player hits it what it says in the script is what it does. But is not doing anything.

10 comments
wait so what does that script do exactly?
im guessing it gives cash to someone and does someone else on all clients
It deletes a part that the player has in its right hand, gives player 5 more of cash, fire a remote event and destroy its parent.
and it just does nothing?
Yeah, wait, I changed something but it still does not work
u cant give cash in a localscript
Is in a script.
a script in a brick?
well still it has to fire a remote event to the server and from there u can manage the currency
Is in a brick, also the remote event connects to 4 localscripts.