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

How to move cframe model?

Asked by 6 years ago

Hello,

So I need some help here, I am doing a show on Roblox and have a set thing that needs to come in. It's a car that is a model. Using Cframe, I would like to know how would I move this car to another bricks position using Cframe. I would like it to have a tween in between. I know how to kind of doing it to one brick, but not sure how to do it with a model. I know it has to do with primarypart. Thanks, Anthony

1 answer

Log in to vote
0
Answered by
Bellyrium 310 Moderation Voter
6 years ago

Setting a PrimaryPart under model will help! then you can use this

for INC = 0,1 , (1/10) do -- this says go between 0 and 1 going up by 1/10 and INC = the current step
Model:SetPrimaryPartCFrame(StartCFrameValue:Lerp(EndingCFrameValue,INC)) -- this will set the cframe between startCFrame and EndCFrame using INC as a ratio. 0 would be the start, 1 the end, 0.5 the middle
wait()
end


Ad

Answer this question