How to make nexbot move to a position

I tried MoveToPos() but it gave error.
Also I need to know how to make nextbot face an entity.

What error did it gave you

Attempt to yield across C-call boundary

That function only works in a coroutine. See the default nextbot as an example.