Health system 2d

using UnityEngine;
using System.Collections;

public class GameManager : MonoBehaviour {

	//Player Life
	public Texture playersHealthTexture;

	//Control Screen Position of Texture
	public float screenPositionX;
	public float screenPositionY;

	//Controls Icon Size on Screen
	public float iconSizeX = 25;
	public float iconSizeY = 25;

	//Starting lives
	public int playersHealth = 5;

	void Ongui(){

		//Controls Players Health Textures
		for(int h = 0; h < playersHealth; h++){
			GUI.DrawTexture(new Rect(screenPositionX + (h * iconSizeX), screenPositionY, iconSizeX, iconSizeY), playersHealthTexture,ScaleMode.ScaleToFit, true, 0);

Thats my code in #c but when i hit play theres no errors
but my health texture isn’t showing up when it on???
What should i do i want a health system that shows 5 of
my hearth health textures and 1 is taken away every time
he dies.

Should be OnGUI()

It’s probably because you didn’t declare any values for screenPositionX and screenPositionY