Hello. I’ve been trying to make a simple script with two tweens which both update part’s CFrame.
But the problem is the first tween in order overrides the next CFrameTween so the second one just doesn’t run at all. I actually don’t know why this happens, because first updates the CFrame position while the second one updates CFrame rotation.
local TweenService = game:GetService("TweenService")
local TransparencyInfo = TweenInfo.new(3, Enum.EasingStyle.Sine, Enum.EasingDirection.Out)
local FallInfo1 = TweenInfo.new(10, Enum.EasingStyle.Sine, Enum.EasingDirection.Out)
local FallInfo2 = TweenInfo.new(3, Enum.EasingStyle.Sine, Enum.EasingDirection.In)
local function fall()
local part = script.Parent:GetChildren()[math.random(1, #script.Parent:GetChildren())]
local TransparencyTween = TweenService:Create(part, TransparencyInfo, {Transparency = 1})
local CFrameTween1 = TweenService:Create(part, FallInfo2, {CFrame = part.CFrame * CFrame.new(0, -30, 0)})
local CFrameTween2 = TweenService:Create(part, FallInfo1, {CFrame = part.CFrame * CFrame.Angles(math.rad(math.random(-75, 75)), 0, math.rad(math.random(-75, 75)))})
part.BrickColor = BrickColor.new("Black")
task.wait(3)
part.CanCollide = false
TransparencyTween:Play()
CFrameTween1:Play() --blocks the next cframe from playing properly
CFrameTween2:Play() --yep this one
end
here’s the code
(forgot to mention but yes, I need them both separate because I need different time for positioning and rotating, so, yeah)