using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Networking; public class destroyCar : NetworkBehaviour { public carCount text; void OnTriggerEnter (Collider other) { if(isServer) { text.IncrementValue(); Destroy(other.gameObject); } } }