Infinite Runner Tutorial - Destroyer Problem

Hi,

I am working through Mike Geig’s “Lets Make a Game: Infinite Runner” tutorial

Really good session… well done Mike!

I am having a problem getting the destroyers to work properly. I have recapped the tutorial but cant find where i’m going wrong.

Inspector Settings for Quad/Destroyer

Script for Quad/Destroyer
21470-destroyer_script.jpg

I don’t get errors, my game just stops every time the first platform hits the rear destroyer… it doesn’t seam to destroy anything.

Thanks,

Your problem is the semi-colon “;” after the IF statement line. IF Statements don’t have semi-colons.

Are you sure that your platforms doesn’t have the “Player” tag? If that’s the case, then when they collide with the destroyer the “Debug.break();” would make the game stop.