can some one give me a script ,,,,,,,, for unity 2d csharp ,, i want to go to a platform,,,, and destroy the platform as soon as i leave it,,,,,,,,,,,, i have this script ,,, but it doesnt work.. like i want
using UnityEngine;
using System.Collections;
public class collision : MonoBehaviour
{
void OnTriggerEnter2D(Collider2D other)
{
if (other.gameObject.tag == "Enemy")
{
Destroy(other.gameObject);
}
}
}
i want the player to touch the platform ,, and then after you leave the platform ,,,, the platform gets destroyed... pleazzzzzz help. also ,, dont want to get banned for this,, i like the page alot