PLEASE READ:
I am trying to tween the position AND rotation of a model. This is multiple parts welded together connected with a primary part.
part of my issue is the tween must move up and down slowly with the easing style “Sine”
and the tween must rotate 360 degrees around with the easing style “Linear”
I’m doing something wrong with my current script (see below) as it only applies the tween to the primary part. No other parts in the model move with it.
-All of the parts are welded together
-The model has a primary part
local maxwell = script.Parent.PrimaryPart
local maxwellPos = maxwell.Position
local maxwellrot = maxwell.Rotation
local tweenservice = game:GetService("TweenService")
local info1 = TweenInfo.new(
0.8,
Enum.EasingStyle.Sine,
Enum.EasingDirection.InOut,
-1,
true
)
local info2 = TweenInfo.new(
2.5,
Enum.EasingStyle.Linear,
Enum.EasingDirection.InOut,
-1,
false
)
local newTween = tweenservice:Create(maxwell, info1,{ Position = maxwellPos + Vector3.new(0, 1, 0)})
local newTween2 = tweenservice:Create(maxwell, info2,{ Rotation = maxwellrot + Vector3.new(0, 360, 0)})
newTween:Play()
newTween2:Play()
Thank you, I am not good at scripting, and I am getting desperate
maxwell dance.rbxl (89.9 KB)
– the project file if needed