i want to go to a platform and stay there, and as soon as i leave the platform … the platform gets destroyed… i have been trying alot …and i just dont know how to do it, im a noob at this, and im stuck
i used this and some other scripts , but they dont work like i want
.using UnityEngine;
using System.Collections;
public class collision : MonoBehaviour
{
void OnCollisionEnter2D(Collision2D col)
{
Destroy(GameObject.FindWithTag("Enemy"));
}
}
and some others, like on trigger , on collider with name tag , nd stuff help please… i want the player to enter the platform (platform name is enemy)(2d) stay as long as he wants, but as soon as he leaves, the platform dissapears