Hello I am pretty new to coding and I have a problem so far. I made a platform and when I step on it I want the platform to destroy itself after 2 seconds.
On the platform I have a box collider with ontrigger checked and this script attached.
#pragma strict
function OnTriggerEnter (other : Collider)
{
if(other.tag == "Player")
{
Destroy(gameObject, 2);
}
}
Now when my player collides with the object, the platform is destroyed but the player falls through the platform its like the player isn’t colliding with the object.
Thank You