Hey there I'm working on a basic zombie defense game and I want to make it to when a zombie dies every player in the game gains money. I already have leaderstats and a currency set up I just don't know how to add x amount of currency to everyone's balance when a zombie dies.
If your curious why everyone and not the person who killed the zombie
I'm doing everyone gets money when a zombie dies because the bullets are made of parts so its difficult to give the player who killed the zombie the money.
Try this
for i,v in pairs(game:GetService("Players"):GetDescendants()) do if v.Name = currencyname then v.Value += amountofcurrency end end