Home Unity

Need help with C# in Unity

Working on creating an item that I am able to collect in my level. Right now, I have my item laid out in the level, I have a box collider on a cube with no mesh rendering to trigger a point light that will highlight the item when the player is within range of the item. I created an item script that will make a noise, display some text, and delete the prefab object once the item is collected, but when I walk into the item, none of that happens. The point light highlights the item, but I do not collect it, nor does it make a noise.

I took a picture of my script so maybe someone could see where I am wrong?

Replies

Sign In or Register to comment.