Help playing movie ~ (NullReferenceException: Object reference not set to an instance of an object)

Hey everyone. Currently I’m trying to have a video play in fullscreen, lock the cursor, etc. Everything that you’d expect for a cutscene/that sort of thing. I’ve looked at various tutorials as far as this goes, and between mixing different tutorials together to try and get it to work- I’ve got my code, however it throws the following error:

“NullReferenceException: Object reference not set to an instance of an object
UnityEngine.GUI.DrawTexture (Rect position, UnityEngine.Texture image, ScaleMode scaleMode, Boolean alphaBlend, Single imageAspect)
UnityEngine.GUI.DrawTexture (Rect position, UnityEngine.Texture image)
ShouldPlay.onGUI () (at Assets/Custom Assets/Scripts/MainMenu/Scripts/ShouldPlay.js:29)”

var shouldPlay : boolean = false;
var VideoTexture : MovieTexture;

function Start () {

}

function Update () {

}

function ShouldPlay (shouldPlay : boolean) {
	
	if (shouldPlay) {
	onGUI();
	Screen.fullScreen = true;
	Screen.showCursor = false;
	VideoTexture.Play();
	}
}

function onGUI () {
	GUI.DrawTexture(Rect(0,0,Screen.width,Screen.height),VideoTexture,ScaleMode.ScaleToFit); // IMPORTANT: This is the line the code error leads to.
}

I feel I should also mention I use .SendMessage to trigger the shouldPlay boolean to true.

function onGUI ()

Should be

function OnGUI()

Also you do not need to manually call OnGUI() as it will be called several times per frame simply from having

function OnGUI() in your code.