I am making a zombie game where if you shoot the zombies and kill them you get money. But in this case my script isn't working, can anyone help please? Thanks!
game.Players.PlayerAdded:connect(function()
local Zombie = game.ServerStorage.Zombie
local player = script.Parent.Parent
local leaderboard = player:WaitForChild("leaderstats")
local money = leaderboard:WaitForChild("Money")
Zombie:WaitForChild("Humanoid").Died:connect(function()
money.Value = money.Value + 100
end)
end)

2 comments
On line two it is stored in Server Storage for another script purpose. So no worries for that line
Line two is where the Zombies will get cloned into workspace