pickup won't remove from scene upon collision?

I’m constructing a very simple game wherein character runs around collects items and runs into a certain point and its game over. I can’t seem to get the objects to remove from the scene and i’m unsure why.

This is the first script (the script placing the object(pocket watch) into the scene) [18703-screen+shot+2013-11-29+at+21.48.18.png|18703]

This is the second script that is used to/supposed to remove the objects upon collision:

[18705-screen+shot+2013-11-29+at+21.48.01.png|18705]

1 Answer

1

change if(other.name==“player”) to

other.gameObject.tag==“player”

please vote me if it works ,thank u

It didn't work character still runs through the objects and it doesn't remove from the scene.