Error CS0111: Type ‘Collisions’ already defines a member called ‘OnCollisionEnter’ with the same parameter types

I had this code working before and added a boolean to only allow the player to change an objects’ colour, but now this code on its own doesnt work?

I get the error:

Assets\Scripts\Collisions.cs(7,18): error CS0111: Type ‘Collisions’ already defines a member called ‘OnCollisionEnter’ with the same parameter types

public class Collisions : MonoBehaviour
{
    private void OnCollisionEnter(Collision other) 
    {  
        GetComponent<MeshRenderer>().material.color = Color.cyan;   
    }
}

It says that “Collisions” is not a unique name in your codebase. To resolve this error change both class and file names to something different, like LetThereBeCollisions & LetThereBeCollisions.cs.

Watch out you might accidentally added a non desired namespace watch your using. Right now you only need using UnityEngine. All else you can safely remove.