My script is just ignoring a conditional statement?
Sorry if it's a dumb question, but i'm still pretty new to the whole coding thing, and I thought I would get some more experienced opinions. I'm looking to have this script regenerate an npc if a certain amount of time passes, and the npc has full health.
The NPC is respawning, regardless of how much health he has, including full health.
I might just be a bingus, but thank you for taking the time to help me out!
02 | if (object ~ = nil ) and (object ~ = game.Workspace) and script.Parent.Humanoid.Health > = script.Parent.Humanoid.MaxHealth then |
08 | waitTime = math.random( 3 , 15 ) |
09 | wait(math.random( 0 , waitTime)) |
17 | model.Parent = game.Workspace |