Invalid set index 'texture' (on base: 'Sprite2D') with value of type 'String'.

Godot Version

Godot_v4.2.1

Question

I have followed the 2D Character Creator tutorial on youtube by Oops i Dev'd and even after I followed the tutorial I still kept getting this error Invalid set index 'texture' (on base: 'Sprite2D') with value of type 'String'. I'm not sure what it's telling me and if anyone could help that would be great.

It should be meaning the right hand side value is a String, so it can’t be assigned to a Sprite2D’s texture which needs Texture2D.
Maybe have a look at why Global.bodies_collection[current_sprite] is getting a string?