How to make a wandering script for a skinned mesh?

So i made a model in blender and it look like this :
image
but when i start the script:

while task.wait(0.1	) do
	local x = math.random(-15,15)
	local z = math.random(-15,15)
	script.Parent:MoveTo(Vector3.new(x.script.Parent,z))
end

the model slip back and don’t move at all, i don’t think it’s because of the animation that i did for it, and by the way i want to do an animation play when he walk, and when he stand still, if anyone got any idea on how to fix this i would really thanks him !

I think the best way is to weld it to a normal rig with a humanoid, and make that move.
I can’t think of anything else.

i tried some things but i can’t figure out what do you mean