Hi, I'm having a problem "Invalid set index 'velocity' (on base: 'CharacterBody3D') with value of type 'null instance'." when trying to set the velocity of my fireball instance, I get the error above when trying to use it and the game crashes.
My code:
if Input.is_action_just_pressed("skill"):
var instance = fireballskill.instantiate()
get_parent().add_child(instance)
instance.global_position = fireballposition
var direction = -camera.global_transform.basis.z
direction.y = 0
direction = direction.normalized()
instance.velocity = move_and_collide(direction * delta)

    nekohii it might aid readers to format the code here to clearly demonstrate the scope of instance.

    Toxe you got it, I think. It’s calling the setter with a null value (because there’s no collision)

    I've got it by changing the body type to rigid body and used apply_force thanks for replies