Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do i prevent a model from moving on top of the roof?

Asked by 8 years ago
Edited 8 years ago

Then i use :MoveTo() to move a model inside a building, it just appears on the roof. Why? Is there any way to prevent it from doing that?

1 answer

Log in to vote
1
Answered by 8 years ago

MoveTo() moves object by the position. Moving stuff by the position automatically puts them on the top if it detects any collision. To force the position, you need to use a function that works with CFrame and not Vector3.

0
that function is SetPrimaryPartCFrame Perci1 4988 — 8y
0
Thanks for the help! dovydas12345 15 — 8y
Ad

Answer this question