No sub-components show up when attaching the script...

Hey,

I was just adding this script from here which is in C#: Click here, but no sub-components show up under the script component when I attach it to my enemy. Also, I get an error saying this :

I tried everything but nothing works. I had another C# script with some of the same variables declared and for that script, the sub-components showed up. I don’t know why it wouldn’t for this. Is it because there is an error so it doesn’t work properly? Could someone help? Thanks, will really appreciate it!

Sincerely,

goldkillerv

Errors can prevent the auto-complete from presenting you with options. But your issue seems to be that ‘HealthBarGUI’ doesn’t exist.

Either you missed a step in the tutorial or the tutorial is missing a step. You have to either define the ‘HealthBarGUI’ object or remove all references to it.