Cannot set property 'string' of null

Cannot set property 'string' of null
0
#1

I get this error when try to init the values to the labels, also I have a default values and change into the inspector, what is wrong in the script?

  • Simulator: ERROR: Uncaught TypeError: Cannot set property ‘string’ of null, location: assets/scripts/MinionProperties.js:0:0

55

0 Likes

#2

make sure that you have set “attackLal” and “healthLbl” in the inspector.

if possible, pls give me a demo

0 Likes

closed #3

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

0 Likes

#4

The problem was that… when I instantiate the prefab, I save two different copies and one of them not have well attached the labels

0 Likes