How do I place a script into an object?

Monodevelop Script Problem - YouTube (A video to show you what is happening.)

I’m getting the error with everything, no matter what it is. This is literally crippling Unity for me.

What I’m trying to do is make a script that allows the Particle Emitter to turn on\off when I hold the mouse button down. Here is the script I am trying to use:

using UnityEngine;
using System.Collections;

public class Piss : MonoBehaviour
{

// Use this for initialization
void Start ()
{
	public class ExampleClass : MonoBehaviour {
		void Update() {
			if (Input.GetMouseButtonDown(0))
				Debug.Log("Pressed left click."); Play(withChildren: bool = true): void;
}

// Update is called once per frame
void Update ()
{

}

}

Your script is a total mess :slight_smile:

using UnityEngine;
using System.Collections;

public class test : MonoBehaviour {
	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {

        if (Input.GetMouseButtonDown(0))
        {
            Debug.Log("Pressed left click.");
            particleSystem.Play(true);
            
        }
        
	}

     
}