Godot Version 4.4
Question
This is a Snippet of my code for a shooting mechanic
var bullet = preload("res://Scenes/bullet.tscn")
@onready var pos: Marker3D = $Mesh/Gun/pos
func _physics_process(delta: float) -> void:
if Input.is_action_just_pressed("fire"):
var instance = bullet.instance()
instance.position = pos.global_position
instance.transform.basis = pos.global_transform.basis
get_parent().add_child(instance)
However I get the error Invalid call. Nonexistent function 'instance' in base 'PackedScene'.
What does it Mean and how do I fix it