script.Parent:MoveTo(41, 0.5, -1)
error: 20:07:14.506 - Unable to cast value to Object
its a script inside humanoid, what am i doing wrong?
The MoveTo function requires a Vector3 argument.
script.Parent:MoveTo(Vector3.new(41, 0.5, -1))
You may be wondering why putting that is necessary. 41, 0.5, -1 are just three different numbers, not a position. So in certain arguments for functions, you may just need to put different numbers. When it comes to multiple numbers used as a Color,Vector,UDim and so on, you need to specify. What you will also notice is the amount of information you put into the arguements of these is equal to the number after them. So for example, Vector2.new() would need two arguments (x,y) while Vector3.new() would need three (x,y,z). Anyways, I hope I helped, have a good day!