• 3D
  • making things invisible and visible using GD script

i am fairly new to godot so i dont know much. i was wondering if there was a way a mesh could start off invisible, but become visible when a button is pressed?

Welcome to the forums @takedabro1!

You can toggle visibility for a Spatial node using visible = true and visible.false (documentation). You can use a MeshInstance node to display the mesh, and because it extends the Spatial node, you can toggle visibility with the visible property :smile:

@TwistedTwigleg thank you for responding, if i were to use that what would i write?, would i just simply write visible.false at the beginning of the script?

You can add that code to the _ready function:

func _ready():
    visible = false

I think you can also just use the inspector if you want to do it in the editor GUI.