Having trouble with "null value"

4.3.stable

I’m new to programing and GDscript and I’m trying to get some fps features working. Every time I try to run my project it kicks me and gives me this message.
Screenshot 2024-10-25 175626

For this line of code
Screenshot 2024-10-25 175604

Here’s some other code that might be of interest (I’m not sure)
Screenshot 2024-10-25 175521

I’ve looked around for help with this problem but for some reason I can’t seem to get a solution.

In the editor you need to select a CharacterBody3D for PLAYER. By default, PLAYER is null.

As a workaround, replace:

@export var PLAYER : CharacterBody3D

with:

@onready var PLAYER: CharacterBody3D = $TypeHereYourCharacterName
3 Likes