9 - Player UI Prefab

I have been following along with the official tutorial, using their assets, and I am getting an error that an object is not set to an instance of an object, when I click on it, it refers to these 2 instances of code in my PlayerUi script:
This in the update:
if (playerHealthSlider != null)
{
playerHealthSlider.value = target.Health; // Object reference not set to an instance of an object
}

and this in the SetTarget function:

if(playerNameText != null)
{
playerNameText.text = target.photonView.Owner.NickName; // Object reference not set to an instance of an object
}

Comments

Sign In or Register to comment.