Strange collision problem with block and terrain

Hey folks.

I have blocks falling from the sky onto some terrain. The blocks are tagged “Block” and the terrain is tagged “Ground”.

The block has the following code attached to it:

http://pastebin.com/91pir1gA

I have another piece of code elsewhere which basically does the same thing but increases the width - and this is working perfectly, i.e makes the progress bar grow. The idea of this code is - when the block touches the ground - the progress bar should shrink.

2 questions:

1/I would expect the collision to be tagged as “Ground” - yet it is always tagged “Block” when the block hits the ground - remembering that this script is attached to the Block itself, this seems odd.

2/The progress bar does not shrink…

Please help!

I have no idea what the problem was - but after a bit of debugging i solved it by retagging both block and terrain :slight_smile: