Assigning an export in the inspector

Godot Version

Godot 4


How do i set an export to a specific node?
I am trying to get a specific node in this other node but it wont do @onready because it will break it

Not sure if you mean this but you can specify var type for the export:

@export var character: CharacterBody2D

So the inspector (and the script itself) will only allow you to add that type of node.

how do i add the node? it doesnt let me just copy the name of the node

Not really really sure what situation you are facing. Sharing an screenshot may help to understand.