It is working corectly, but when other player touch it, it doesn't give money to other player.
Script:
local debouce = true
local moneySFX = script.Parent.Money
local moneyEmitter = script.Parent.ParticleEmitter
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") ~= nil then
if debouce then
debouce = false
moneySFX:Play()
moneyEmitter.Enabled = true
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
player.leaderstats.Money.Value = player.leaderstats.Money.Value + 25
wait(1)
moneyEmitter.Enabled = false
end
end
end)

1 comment
now how do I make this only work once for local player?