Hi, I am trying to tween a car to point b, but it’s only tweening the primary part, not the model itself. How would I do that?
local TweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(
2, -- The time the tween takes to complete
Enum.EasingStyle.Linear, -- The tween style.
Enum.EasingDirection.Out, -- EasingDirection
-1, -- How many times you want the tween to repeat. If you make it less than 0 it will repeat forever.
false, -- Reverse?
0 -- Delay
)
while true do
local Car = game.ServerStorage.CarProps.Car:Clone()
Car.Parent = game.Workspace
Car.PrimaryPart.CFrame = game.Workspace.Route1Drive.Start.CFrame * CFrame.new(0,1,0)
local Tween = TweenService:Create(Car.PrimaryPart, tweenInfo, {CFrame = game.Workspace.Route1Drive.End.CFrame}) -- Creates the tween with the TweenInfo and what properties you want to change
Tween:Play()
wait(2)
Car:Destroy()
wait(5)
end