Code that was working is now not working even though it's unchanged

The error I’m getting is - Attempt to call function ‘is_playing’ in base ‘null instance’ on a null instance.

The weird thing is is that this code is was working fine and I haven’t changed it much. better_ani is also an established variable

@onready var better_ani = $Camera/gun/alpha_gun_ani
func shoot():
	if !better_ani.is_playing() and gun:
		better_ani.play("shoot2")
		print("PEW")
		$pew.play()

let’s say your node path is still correct, then you will need to add something like: