I got this script which gets the direction towards the target so that I could move the character there but when the character reaches the destination, it starts to get buggy.
local vector = (WalkToPoint - origin) * Vector3.new(1, 0, 1)
local direction = vector.Unit