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

How can i move a model in relation to mouse?

Asked by 7 years ago

ive tried :MoveTo(mouse.hit) i know it can be done im just not quite sure how to accomplish it.

2 answers

Log in to vote
2
Answered by 7 years ago

:MoveTo() requires a Vector3, but Mouse.Hit is a CFrame. To fix it (assuming it wasn't working) you should use :MoveTo(mouse.Hit.p) instead. You can also use :SetPrimaryPartCFrame(mouse.Hit) if you set the PrimaryPart of your model.

0
I like this answer. User#11440 120 — 7y
0
Thank you very much Chaserox 62 — 7y
Ad
Log in to vote
0
Answered by
Omarstein 100
7 years ago
Edited 7 years ago

I personally like to use NXTBoy's Model CFrame script which is available on the wiki, it allows you to CFrame an entire model instead of using :MoveTo() NXTBoy's Model CFrame

Answer this question