Error CS0131 - (line 9, character 17) The left hand side of an assignment must be a variable, property or an index

I am just starting out with coding in unity and i am trying to make a simple game over scene when the player dies. I have made a script where my player GameObject is deleted when the player dies. I want to check if the player object is existing, if it is, skip to the next frame. If it doesnt exist i want to switch scenes to my scene call ‘Game Over’ However. i keep getting the error listed in the title of this thread. Any help would be greatly appreciated. Also, if you wouldn’t mind, could someone please help me code this part? It’s really confusing me and i’m stuck. What i want to do is listed above. Thanks heaps :slight_smile:

this is my code (error is on line 9 character 17)

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class GameOver : MonoBehaviour {
public GameObject Player;

public void LoadScene(string name) {
	if(GameObject.Find("Player") = null) {
		Application.LoadLevel (name);


Well, checking for equality need two equal signs :wink:


if(GameObject.Find("Player") == null) {

not this:

if(GameObject.Find("Player") = null) {