Humanoid is not a valid member of Backpack error?
I am trying to make this weapon that heals the player when their HP hits or is below a certain number, but the thing is, I keep getting an error. The error states that Humanoid is not a valid member of backpack. I've tried doing something like this before, but it worked perfectly. It is a normal script, and it is not a local script, although I have tried to convert it to local, and it still didn't work. What am I doing wrong?
1 | script.Parent.Parent.Humanoid.HealthChanged:connect( function (hp) |
4 | print ( "Heal the player!" ) |
5 | script.Parent.Parent.Humanoid.Health = 10 |