Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to move cframe model?

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

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


This discussion is preserved as it was. New answers, comments, and votes are closed.