public void CreateBar() { playerBarscript = PlayerUI.GetComponent <BarsUI>(); if (playerBarscript != null) { playerBarscript.InitBars(this); } }