How to make an object appear after collecting items

Hi everyone! I’m trying to make an object appear after collecting 3 things. The script in the screenshot is on my first person controller. I have three clumps on nodes, one for each object so that no matter what order you collect them, the new object will still appear. Everything looks like it should work to me. The problem is that it isn’t working. As you can see in the screenshot, everything went through and the renderer set enabled node got set to true with the object I want to appear, but it doesn’t. Does anyone know why this isn’t working?

I’m wondering if it’s because there’s a null between the on collision enter and the compare tag. When I play the game, it briefly says the name of the object I collided with then turns to null. I don’t know why it’s saying that or how to fix it. I’m also not getting any errors from by debug in the console.

maybe its because you are using a Prefab for the Renderer set enabled when you supposed to use the gameobject in the scene or it seems like that but if you are then maybe you could try using gameobject set active instead

1 Like

Yes that worked! I created a game object scene variable and replaced the game object literals with it and it worked. Thank you!

np