What I want to happen is when a character presses 'M' then a model will slowly come up from the ground next to the character. I can do the pressing M part but I'm not sure how to move the model smoothly.
✓ ANSWER ACCEPTED
Is it possible to lerp a model? If so, how?
2 answers
✓ Accepted answer
Basic lerp methods:
cframeoffset = CFrame.new()
game:GetService("RunService").RenderStepped:Connect(function()
cframeoffset = cframeoffset:lerp(target CFrame, alpha) --when approaching its target slows down, e.g: 0, 0.5, 0.75, 0.875 etc...
cframeoffset = start CFrame:lerp(target CFrame, alpha) --travels at a steady speed, e.g: 0.1, 0.2, 0.3, 0.4 etc...
end)
And to lerp the model:
local model = path.to.model
game:GetService("RunService").RenderStepped:Connect(function()
--method you used to set the cframe
model:SetPrimaryPartCFrame(cframeoffset)
end)
I hope this helps.
You can set the model's Model.PrimaryPart property, and afterwawrds use the Model:SetPrimaryPartCFrame() method and the CFrame:lerp() method to do this. I'd caution you that you should weld the parts of your model to the primary part to prevent rounding errors from slowly distorting your model as it moves over time. (See here: https://devforum.roblox.com/t/setprimarypartcframe-gradually-offsets-component-parts/16041)
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
Yeah, I haven't started lerping because when I spawn the model, it spawns sideways. I posted another question about that, but no one has answered it yet.
just use angles to rotate the model, cf * CFrame.Angles(rad(n), rad(n), rad(n))
Pretty sure I did that and it didn't work.
Okay the orientation worked. Decided not to lerp though.