Hi, I want to rotate a model, keeping their offsets to the primaryPart when tweening it, while having the parts offsetted from the origin being tweened. Ik, this is dumb, since u cant really have 2 tweens at once playing on the same part, but, I’m tweening the origin, which is supposed to rotate everything, and tweening every single “Part” which is a child of “Model”, so it’s tweening different things? (nvm)
Here is the script. Let me know if i can somehow achieve what I just said
local children = script.Parent.Parent:GetChildren()
local CF = script.Parent.CFrame
local tweenService = game:GetService("TweenService")
local goal2 = {}
goal2.Transparency = 0.5
goal2.Size = Vector3.new(360.198, 1.3, 1.3)
wait(2)
for i, v in ipairs(children) do
if v.Name ~= "Origin" then
coroutine.wrap(function()
local goal = {}
goal.CFrame = CF*CFrame.Angles(0,math.rad(math.random(-50,50)), math.rad(math.random(-50,50)))
local goal02 = {}
goal02.CFrame = CF*CFrame.Angles(0,math.rad(math.random(-40,40)), math.rad(math.random(-40,40)))
local goal03 = {}
goal03.CFrame = CF*CFrame.Angles(0,math.rad(math.random(-20,20)), math.rad(math.random(-20,20)))
local goal04 = {}
goal04.CFrame = CF*CFrame.Angles(0,math.rad(math.random(-15,15)), math.rad(math.random(-15,15)))
local goalT = {}
goalT.CFrame = CFrame.new(-140.812927, 35.7782631, -5.24770832, 1, 0, 0, 0, 1, 0, 0, 0, 1)
local tween1 = tweenService:Create(v, TweenInfo.new(0.7, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), goal)
tween1:Play()
local tween2 = tweenService:Create(v.Part, TweenInfo.new(2.5, Enum.EasingStyle.Sine), goal2)
tween2:Play()
tween1.Completed:Wait()
local tween02 = tweenService:Create(v, TweenInfo.new(0.7, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), goal02)
tween02:Play()
tween02.Completed:Wait()
local tween03 = tweenService:Create(v, TweenInfo.new(0.4, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), goal03)
tween03:Play()
tween03.Completed:Wait()
local tween04 = tweenService:Create(v, TweenInfo.new(0.3, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), goal04)
tween04:Play()
tween04.Completed:Wait()
local tween05 = tweenService:Create(v, TweenInfo.new(3, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out), goalT)
tween05:Play()
end)()
coroutine.wrap(function()
wait(0.1)
local t = i*2;
while wait() do
local hue = tick() % t / t
local colorH = Color3.fromHSV(hue, 0.65, 1)
v.Part.Color = colorH
end
end)()
end
if v.Name == "Origin" then
coroutine.wrap(function()
wait(0.1)
local goalSize = {}
goalSize.Size = Vector3.new(3,3,3)
local goalAngle = {}
goalAngle.CFrame = v.CFrame*CFrame.Angles(90,0,0)
local goalTransparency = {}
goalTransparency.Transparency = 0.4
local tween1 = tweenService:Create(v, TweenInfo.new(3, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut, -1, true), goalSize)
tween1:Play()
local tween12 = tweenService:Create(v, TweenInfo.new(0.2, Enum.EasingStyle.Linear, Enum.EasingDirection.In, -1), goalAngle)
tween12:Play()
local tween2 = tweenService:Create(v, TweenInfo.new(3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), goalTransparency)
tween2:Play()
local t = 2;
while wait() do
local hue = tick() % t / t
local colorH = Color3.fromHSV(hue, 0.45, 1)
v.Color = colorH
end
end)()
end
end
Sorry if it was confusing, but ask away if you have questions.
The above script achieves this:
https://gyazo.com/327f82882472a681ab210bdd64cb3933
Visual of the problem:
https://gyazo.com/d8d0ada132ea404d9028c3eb8fa4a234
(Sorry but i might be offline right after making the post >-<