Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Game Development How to Make a Video Game Score, Enemies, and Game State Monitor Player Health

The Frog Won't Die

I have done everything in this video exactly as it was shown and my frog will not die. There are no particles or anything the bird just closes distance with the frog and just stands there when it reaches it.

5 Answers

I actually just found out what it was. I did not capitalize the O in OnTriggerEnter and the compiler didn't complain about it. I was getting so frustrated with it because I thought this was another case of obsolete syntax like what I found in the swift for iOS tutorials.

Edward Lopez
Edward Lopez
5,998 Points

Wow dude thanks for that! I kept trying to change a bunch of stuff cause my frog wouldn't get eaten. I also didn't capitalize the o on OnTriggerEnter, would have taken longer to figure it out!

Mark VonGyer
Mark VonGyer
21,239 Points

god damn! I've done this twice now too lol!

Tommy Sollén
Tommy Sollén
3,583 Points

THANKS! I did the exact same mistake and couldn't see it myself.

Peter Deitz
Peter Deitz
6,797 Points

Same here. For some reason I didn't capitalize the O in OnTriggerEnter and that was what was preventing the player particles from appearing.

John Steer-Fowler
PLUS
John Steer-Fowler
Courses Plus Student 11,734 Points

Hi Brian,

Have you linked the correct scripts with the Player Game Object and the Bird Game Object?

I obviously can't see your game, but I think you have written the script, but not linked it to the correct Game Object/Component.

In this case, although you have the script written, Unity does not yet know to associate that script with the Game Object until you tell it to associate it.

Alan Mattanó
PLUS
Alan Mattanó
Courses Plus Student 12,188 Points

I has the same problem but in production. Only when i compile the game ready to ship it. In the editor works fine. Any of you have the same problem?

+1! (Same problem) :O