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

How to move a model?

Asked by
FiredDusk 1466 Moderation Voter
9 years ago

This gives the part a direction. How would I make it where I could do this with a model?

local b = Instance.new('BodyVelocity')
b.maxForce = Vector3.new(math.huge, math.huge, math.huge)
b.velocity = Vector3.new(0, 10, 0)
b.Parent = Workspace.Part

1 answer

Log in to vote
1
Answered by 9 years ago

Okay, I'm not that good with "Body" objects, but I'll try.

Here, we will use a thing called "model:SetPrimaryPartCFrame".

What it does is when you set a primary part, all the model will move to the direction of that single part.

For example:

model = script.Parent.Parent
model.PrimaryPart = script.Parent

while true do
    model:SetPrimaryPartCFrame(model.PrimaryPart.CFrame * CFrame.Angles(0, 0.1, 0))
    wait()
end

Try it, it should work!

:o)

Ad

Answer this question