using System.Collections; using System.Collections.Generic; using UnityEngine; public class missleTrail : MonoBehaviour { public float time; private bool timer; // Update is called once per frame void Update() { if(timer) time-=Time.deltaTime; if (time < 0) Destroy(gameObject); } public void StartTimer() { GetComponent().Stop(); timer = true; } }