(Multiplayer) script attached to character can't find image health bar

hi, I have a character with network identity on it, with a script using a “public Image healthBar”,
usually I drag and drop the Image from the canvas child> healthBackground child> healthBar.
but now with multplayer and my player gameobject in the asset folder I need to attach the healthbar image to his script but I really don’t understand how to do that. It’s maybe very noob but i’ve tried hours to try getComponentInChildren but without success (maybe I failed).
Each time I press play, and start a new game, my player spawn but the health value in script cannot access to the canvas’s healthbar.
Really need any help, thanks !

Try adding a public GameObject HealthBarObject to your script and drag-drop the health bar object to the inspector to the field in the script.