Section 5, lecture 89

Hi @Sabeen_Moin,

Remember the other day when I spotted the typo and pointed it out to you - you have the same one in this script also;

void OnCollisionEnder2D (Collision2D collision) {  

That should read;

void OnCollisionEnter2D (Collision2D collision) { 

The code within that method would not have been being called at all, correct the method name and see if that resolves the issue.

If it does, check your other scripts also for the same issue, you may have copy/pasted the same methods from one script to another, hence the same error/issue etc.

Hope this helps. :slight_smile:

Also, when pasting your code into your posts, if you enter three ` characters before it, and three after it, all of the code between will be formatted correctly (I have edited several of your posts to make it easier to read for the person helping you).


See also;

1 Like