Godot Version
4.6 stable
Trying to make my fps player character go round on a Path3D node on a loop once the game starts. Followed this Youtube tutorial to the letter but for some reason I get this error:
“Invalid assignment of property or key ‘walk’ with value of type ‘bool’ on a base object of type 'CharacterBody3D (player.gd)”
I’ve tried going into the the connecting scripts to this one to define variables but it keeps coming up with the same error. I’ve attached an screenshot of the code below and a link to the tutorial I’m using.
That is not the same error message as in your screenshot. The error in the screenshot is about a variable move on a base object of type null_instance, meaning it doesn’t find a child node MeshInstance3D as child of this script’s node. Is MeshInstance3D part of your player scene?
(The script is also referencing %PathFollow3D.progress, which should be just progress if this is the PathFollow3D’s script.)
1 Like
It seems that you wrote %MeshInstance3d in the script first and then renamed the node in the scene to “Player”.
Instead of this:
%MeshInstance3d.move = true
Write this:
%Player.move = true
You’re basically telling the engine “Make the variable move inside the Player equal to true”.