How do i reference all players?
I have a jump over the wall game and when you jump over the wall thers a button you can stand on to make the wall highger, as the wall gets higher you have to try jump on other players to get over. Anyway everything working perfectly except one part in the code . when someone steps on the button i want it to give everyone in the server 5 Cash (currency im using). I can only get it working for one player which is the parent of the hit on the button. How can i reference all players?
Here is the snippet of code i have right now
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
player.leaderstats.Cash.Value = player.leaderstats.Cash.Value + 5