Welcome to the forums @Samlics!
What problem are you having, exactly? Is the missiles not following the player target? Is the code that makes the missile follow the target not working? Its hard to offer any help without knowing what exactly is not working.
My hunch is that the issue is you are not assigning target
correctly, and thus it is not following the desired player. You can try to modify the start
function so it gets the first node in the group and see if that works. Something like this (untested):
func start(_transform, _target):
global_transform = _transform
rotation += rand_range(-0.09, 0.09)
velocity = transform.x * speed
target = _target
# if target is null, then use the player group
if (target == null):
var nodes_in_group = get_tree().get_nodes_in_group("player")
if (nodes_in_group.size() > 0):
target = nodes_in_group[0]