using System.Collections; using System.Collections.Generic; using UnityEngine; public class vfxScript : MonoBehaviour { public float destroyTimer = 5f; // public Transform target; // public Vector3 offsetVFX; void Update() { //transform.position = target.position + offsetVFX; destroyTimer -= Time.deltaTime; if(destroyTimer < 0){ Destroy(gameObject); } } }