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)
the debounce is the problem, you need to set it back to true
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 debounce = true -- add this line so you can get cash again end end end)