Turn Mesh Render On In Another Script?

I made a weapon pickup script, so far I got the character to press the F key and the object disappears. Both of the objects are prefabs and I have disabled the Mesh Render on the other sword.

How do I make the mesh renderer activate once the player presses the F button.

other.renderer.enabled = true; // I suppose. Hard to tell from your description what’s what

Please try to avoid using names like ‘object’ for variables, they are too close to reserved words like Object and can easily confuse.

Thanks so much :slight_smile:
after making a variable at the top it worked.

If anyone else has this problem heres my fix.

At the top make a variable

var other = GameObject.Find(“Sword”);

then under function update put the answer by Dave.

Thanks alot Dave :slight_smile: