Still have questions? Join our Discord server and get real time help.
0

# MoveTo rounding

Workspace.Model:MoveTo(Vector3.new(0,0.3,0))

When I make a model with 1 part in it and use that code in the command bar it moves the part to 0,.4,0. Is there any way to get around the rounding?

1

Use CFrame

0
Zyneak 130
6 years ago

That is because of how collisions work.

What I do is check how off it is and then use the TranslateBy method to offset it.

This will move it regardless of other parts in the way. Please note though it is relative, you're not setting the position.

Here's an example. Say I want to move model to 0,0.4,0. I should note the PrimaryPart should be set.

model:MoveTo(0,0.4,0)
model:TranslateBy(0,(0.4-model.PrimaryPart.Position.Y),0)