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

Part not moving?

So, I literally just want this model's children to move when a part is clicked, however I get this message: "bad argument #1 to '?' (Vector3 expected, got nil)" which I've never come across before. Any help to fixing this will be appreciated.

x = script.Parent:GetChildren()
script.Parent.ClickDetector.MouseClick:connect(function()
x.Position = x.Position + Vector3.new(5,5,5)
end)

1 answer

✓ Accepted answer
:GetChildren()

will return a table which includes the children of the model.

You will have to move each part or use model's primary part property.

1 comment

0

Thanks!

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