No appropriate version of Destroy

Here’s the code:

function OnTriggerEnter()
{
    Destroy(GameObject);
}

And I get: Assets/Standard Assets/Scripts/PlayerDeath.js(3,8): BCE0023: No appropriate version of 'UnityEngine.Object.Destroy' for the argument list '(System.Type)' was found.

Please help me!

So, GameObject is the name of a type, not the name of a variable. What’s the name of the game object you are trying to destroy? Use that in the argument to Destroy.

I fixed this by changing the GameObject to gameObject, but thanks anyways!

function OnTriggerEnter()
{
Destroy(gameObject);
}

I solved this issue by changing the GameObject to gameObject.
But thank you anyways!