That's strange. Here's a few things I'd check:
-| Double check to make sure the exported variable is being set.
-| If you are using a instanced scene, have you checked to see if the exported variable is not null in the base scene? It could be Godot is using the base scene's value over the instanced scene's value (which would be a bug, but...)
-| Did you manually save the scene after setting the exported variable? Sometimes Godot does not realize the variable has changed and so you have to manually save using Control-S
-| Are you setting Speed
anywhere in your code? Perhaps you are setting it to null
in the _ready
function? (unlikely, but I've accidentally had this happen a few times :sweat_smile: )
I suppose you could always check to see if speed
is null
before using it, or use different code if speed
is null
. That would not really fix the issue, but I suppose it would 'fix' the issue temporarily.
Without seeing the scene and/or code, I think the problem is most likely either speed
is being set to null
somewhere in your code, or Godot is not saving the exported variable for some reason. The first is just a matter of looking through the code and seeing if anything looks amiss, while the second is probably Godot not saving the variable correctly, which should be fixable by manually saving (especially if you are using a instanced scene).
It's hard to say what the issue is for sure, so my apologizes if this is not terribly helpful! Hopefully this helps a little!