I have a little airport. I like a airplane to drive or move around there. I tried:
for i = 1,500 do Airplane.Position = Airplane.Position + Vector3.new(0,0,5) wait(0.01) end
& a tutorial by Roblox using BodyPosition
But these only works with parts/unions for me. How do I smooth move a whole model?
Use CFrame instead of position, and use the Set/GetPrimaryPartCFrame method available to models:
local speed = 0.05 -- You want a number much lower than 5 studs because you move it 30 times every second! for i = 1, 500 do local currentCFrame = Airplane:GetPrimaryPartCFrame() Airplane:SetPrimaryPartCFrame( currentCFrame*CFrame.new(0, 0, speed) ) wait() end
The blog has two good articles on what CFrames are and how to use them: