the enemy does not follow the path

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By mdubaisi

i have watched a lot of tutorials about paths and most of them used this script:
onready var parent = get_parent()
onready var offset = parent.offset setget set_offset, get_offset
var speed = 50

func set_offset(value):
offset = value

func get_offset():
return offset

func _physics_process(delta):
if parent is pathFollow2D:
set_offset(get_offset() + speed * delta)
but it did not work

:bust_in_silhouette: Reply From: deaton64

This one works fine for me:

thanks for your answer

mdubaisi | 2020-07-26 10:59