Why is this code not working?

Godot Version



I’m brand new to game development and I have no idea why this script that controls a player (I’m pretty sure at least) isn’t working.

Can someone help me out?

I would say that is because the script is extending from the RigidBody2D instead of the CharacterBody2D. I’m assuming that this script is attached to the player node I see in the Scene and you want it to behave as the character you control during the game.

I tried changing it to CharacterBody2D, but it says it’s an unknown class

Wow, turns out it was a KinematicBody2D, i dont know how i missed that lol

1 Like