#Instantiating enemy, but they wont do any of the code in the script

4 messages · Page 1 of 1 (latest)

broken drift
#

I created an enemy and a spawner for the enemy, both childs of a navigationregion3D. When i manually put in the enemy into my scene it works properly, but when i use the spawner, it becomes scaled down with no collision and it doesnt move at all. Heres my code so far:

extends Node3D
@export var tiger_scene: PackedScene
func _on_timer_timeout() -> void:
    var tiger = tiger_scene.instantiate()
    tiger.position = position
    get_parent().add_child(tiger)

Any help would be really awesome, can someone tell me what im messing up rn?

hoary basin
broken drift
hoary basin