Particle System Scripting !Help!

Hello!

I want to create a first person shooter game, but i have some problems. Hope some of you could help me :slight_smile:

I want to create a bulletTracer every time i shoot (Fire 1), using a particle system. (Not a Line Rendere)

I’m new to scripting and Unity3d.

Here is what is the script looks like.

using UnityEngine;
using System.Collections;

public class Particle : MonoBehaviour {

public bool enableEmission;

// Use this for initialization
void Start () {
enableEmission = false;
}

// Update is called once per frame
void Update () {
if (Input.GetButtonDown(“Fire1”))
{
enableEmission = true;
}

else
{
enableEmission = false;
}
}
}

firstly, use [code ][/code ] tags when you paste code into the forums, there is a sticky on them at the top of the scripting section, they really help with readability

secondly… what are you having problems with? what does that script do? nothing? throw errors? if so what? etc.