You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
I want to be able to make a model tween forwards and rotate at the same time
What is the issue? Include screenshots / videos if possible!
I am using the primary part to tween the mdoels CFrame wich works when the two tweens are seperate. But when applied together they conflict. Using Orientation and Position seperate works for the primary part, but it does not take the rest of the model with it.
What solutions have you tried so far? Did you look for solutions on the Creator Hub?
Using .Postion and .Orientation seperate but only works for primary part. Welding all parts to the model did not work either.
You can use the Model’s Pivot methods (Model:GetPivot() and Model:PivotTo(CFrame)
In combo with RunService you can use :Lerp() and PivotTo()
local start = Model:GetPivot()
local target = CFrame.new(0, 15, 0) * CFrame.Angles(0, 0, math.rad(15))
local tweenTime = 5
local eTime = 0
local conn
conn = game:GetService("RunService").Heartbeat:Connect(function(dt)
eTime += dt
local alpha = math.min(eTime, tweenTime) / tweenTime
local current = start:Lerp(target, alpha)
Model:PivotTo(current)
if alpha == 1 then
conn:Disconnect()
conn = nil
end
end)
If you want a custom easing style since the provided code I gave is linear, you can use
local TweenService = game:GetService("TweenService")
local newAlpha = TweenService:GetValue(alpha: number, easingStyle: Enum.EasingStyle, easingDirection: Enum.EasingDirection)
local current = start:Lerp(target, newAlpha)
Model:PivotTo(current)