the brick doesn’t break
what did I did wroung?
Destroy(this);
will simply destroy the script but you want the entire game object to be destroyed so it should be Destroy(gameObject);
I did that but it doesn’tchange…
Are you getting collisions registering?
Add a line below the timehit increment like:
Debug.Log(name+" was hit by "+collision.name+". Times hit now: "+timehit+" out of a max of "+maxhit);
That way you can verify the collision is taking place and the values are as you would expect them.
I’d also add an extra debug statement inside the if statement so you can see if it’s being triggered.
oh i think i forgot to input the max hit!!!..
or the trriger
i forgot to change the prefab when I duplicated
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.