How can I make the AI car explode when it is near you? and how can I make it so the player car have life?
I would recommend using Vector3.Distance found here in the Unity Scripting Documentation. This will return the distance between for example you and the enemy. You can then use this to check if its less then 2 or something then use Destroy() to destroy the game object, deal damage to the player, and possibly even display a small explosion. Hope this helps. As for making the player car have health you could create a Float variable is a player script and attach it to the player car game object (use MonoBehavior) and have a function to adjust that variable. Hope that helps…