Hello, so I am making a game where we kill zombies, orignal, I know, but im gonna this one different, I won't explain how.
Anyways, here is the script that I have, ignore all of the other code, just focus on line 8-13
name="Humanoid"
robo=script.Parent:clone()
while true do
wait(5)
if script.Parent.Humanoid.Health<1 then
game.Players:GetChildren()
p = game.Players:GetChildren()
for i = 1,#p do
p[i].leaderstats.Cash.Value + 50
end
robot=robo:clone()
robot.Parent=script.Parent.Parent
robot:makeJoints()
script.Parent:remove()
end
end
I'm new the :GetChildren() function, anyways nothing pops up in the output. what I'm trying to do is every time someone kills a zombie, every player is gonna get 50 dollars. Please help.
