Invalid get index 'variable' (on base: 'Nil')

Godot Version



So, I’m currently trying to make a weapons base that I took from a tutorial by StayAtHomeDev (

I think I’ve completed every step in the tutorial, without fault, but something has to be going wrong.

I’ll list my code below:

And the code of the WeaponBase resource:

An additional issue I’m having is I can’t get the export variable in the first image to show itself within the Inspector dock.