Script inherits from native type 'RigidBody3D', so I can't be assigned to an object of type 'Node3D'.

Can yoy please help? I just started coding on godot when i came by this error “Script inherits from native type ‘RigidBody3D’, so I can’t be assigned to an object of type ‘Node3D’.”

With coding in Godot, all scripts will extend from a certain class

at the top of your script you’ll find a line of code, extends RigidBody3D, and this means that the script is designed to be placed on to a node that is a RigidBody3D

some classes inherit from other classes, so for example a RigidBody3D node inherits from a Node3D, meaning that if you change the top line in your script to extends Node3D, you can put that script on to anything that extends the Node3D class - i.e. all 3d nodes in Godot, whereas if you have it as extends RigidBody3D the script can only be attached to RigidBody3d nodes and nodes that inherit it

hope that makes sense!