✓ Accepted answer
Unfortunately, TweenService does not work for models, because they have no way of setting their general position by property (TweenService tweens properties, so it can't tween a function like MoveTo).
This means we are left with psuedo-smooth ways of doing things - AKA, using MoveTo after waiting a very small time (this can be paired with lerp to script it quickly)
But, due to some more model limitations, you need to use PrimaryParts instead.
To set a model's PrimaryPart property, click on it then click on the part you want to act as the model's 'center of movement'.
You can then use the functions GetPrimaryPartCFrame and SetPrimaryPartCFrame on the model to do it.
local Model = game.Workspace.Model
local Start,End = Model:GetPrimaryPartCFrame(), CFrame.new(Vector3.new(0,0,0))
for Position = 0,1,0.01 do end
local NewCFrame = Start:lerp(End,Position)
Model:SetPrimaryPartCFrame(NewCFrame)
wait()
end
To explain lerp a bit more, it is a way of getting the value in a given position with 2 other values to reference by (the value it is called on, and the first value).
Still doesn't really clear it up I think, check the wiki page on it ;)
Hope I helped!
~TDP
1 comment
use lerp or tweenservice