hello, im pretty new to building, but im trying to make this game. i want to make a NPC or Zombies respawn with more health. for example, it'll have a MaxHealth of 100, and then on its cloning function come back with a MaxHealth of 200. I've tried this:
name="Humanoid"
robo=script.Parent:clone()
while true do
wait(1)
if script.Parent.Humanoid.Health<1 then
robot.humanoid.maxhealth = robot.humanoid.maxhealth + 100
robot.humanoid.maxhealth = robot.humanoid.health + 100
robot=robo:clone()
robot.Parent=script.Parent.Parent
robot:makeJoints()
script.Parent:remove()
end
end
but it doesnt seem to work. any ideas on what i can do?

4 comments
ok cool! i got it to work. what u said gave me this idea:
It would be nice if you accept this answer :D
I'd be more than happy to. how do i do that? this is legit my first time on this website LOL