How to remove ingame money when players interact

hi ive been trying to make it so when someone buys something it removes a certain bit of ingame money here is the script
game.Workspace.Part.ProximityPrompt.Triggered:Connect(function(player)
if player.leaderstats.Cash.Value >= 0.15 then player.leaderstats.Cash.Value = player.leaderstats.Cash.Value - 0.15

	end
		
end)
1 Like

make a remote event for when it removes their cash

you can also look at this, it has a solution similar to yours

Not sure if its a good idea to reply on a 2 year old Topic

3 Likes

it doesn’t matter if it’s old or not, someone could face the same issue. no replies were given, and I could have helped someone

2 Likes