Identifier "Global" not declared in the current scope.

`extends CharacterBody3D

var speed = 2
var accel = 10

@onready var nav: NavigationAgent3D = $NavigationAgent3D

func _physics_process(delta):

var direction = Vector3()

**nav.target_position = Global.target.global_position**

direction = nav.get_next_path_position() - global_position
direction = direction.normalized()

velocity = velocity.lerp(direction * speed , accel * delta)

move_and_slide()`

The line in bold is where the error keeps happening. I hope someone can help fix the error :]

Godot doesn't know what Global is supposed to be. You didn't define it in the code you quoted, so I don't know either. I could guess that it's meant to be an autoloaded script. If that's the case, you need to set it in the project's autoload tab, making sure that the Name is set to Global.

@duane is right, you need to autoload to do a global. But curious - why are you needing a global here? Is there another object that uses the value you have?