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

how to move a model and how to rotate?

Asked by 6 years ago
Edited 6 years ago

how to move a model using cfame to one location and how to rotate a model 122.25, 15.887, 459.8 this is the location i what it to be at

0
read the rules omfg Theroofypidgeot 21 — 6y

1 answer

Log in to vote
0
Answered by
Nikkulaos 229 Moderation Voter
6 years ago

When you make your model, make sure to set a primary part (this will be the part that moves everything, like a handle on a gun)

Now, use this script to move your model:

Model:SetPrimaryPartCFrame(CFrame.new(0,0,0)) --Put Custom CFrame here

--To rotate your model, use this part:

Model:SetPrimaryPartCFrame(CFrame.new(0,0,0)*CFrame.Angles(0,0,0)) 
--Same, but edit the Angles part (math.pi is the best to use for basic rotation)
0
thanks tylergoatboy 82 — 6y
0
you could use TranslateBy() WindowMall 54 — 6y
Ad

Answer this question