The player that clicks on the brick will award +100 cash doesn't work (ParticleEmitter Works)
function onClicked() script.Parent.ParticleEmitter.Enabled = true local cashmoney = game.ServerStorage.MoneyStorage:FindFirstChild(player.Name) if cashmoney then cashmoney.Value = cashmoney.Value + 100 end wait(5) script.Parent.ParticleEmitter.Enabled = false end script.Parent.ClickDetector.MouseClick:connect(onClicked)
Your problem is, player is not defined, Try using this:
function onClicked(player) script.Parent.ParticleEmitter.Enabled = true local cashmoney = game.ServerStorage.MoneyStorage:FindFirstChild(player.Name) if cashmoney then cashmoney.Value = cashmoney.Value + 100 end wait(5) script.Parent.ParticleEmitter.Enabled = false end script.Parent.ClickDetector.MouseClick:connect(onClicked)