Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | flinmer |
my bullet are not Appearing
in my screen this mensage appear:
invalid call. nonexisted function “instance” in base GDscript
here is the script
const pre_tiro = preload(“res://Area2D.gd”)
func _physics_process(delta):
if Input. is_action_just_pressed("shoot"):
var bullet = pre_tiro.instance()
bullet.global_position = get_node("Position2D").get_global_position()
get_parent().add_child(bullet)