Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

My titan isn't walking to a part, what am I doing wrong?

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?

2 comments

0

Use Vector3

0

This is why you check the wiki before using a function.

1 answer

✓ Accepted answer

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!

This discussion is preserved as it was. New answers, comments, and votes are closed.