Obstacles and new platform script

https://playcanvas.com/editor/scene/2200439

Obstacle is not moving towards player.

this is the obstacles script.

obstacles script

this is the platform movement script I want to use to update but when I do, the ground disappears
platform movement update