Hello fellow devs, just having a current issue with tweening and my current UI. i feel as if its choppy, and not cosnistent in a sense when im tweening said frame.
`
local cdFrame = slot:WaitForChild("CooldownDisplay")
local TweenService = game:GetService("TweenService")
cdFrame.Visible = true
cdFrame.Size = UDim2.new(1,0,1,0)
local tweenInfo = TweenInfo.new(
cooldownTime,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out
)
-- Shrink downwards smoothly
local tween = TweenService:Create(cdFrame, tweenInfo, {
Size = UDim2.new(1,0,0,0),
Position = UDim2.new(0,0,1,0),
})
tween:Play()
tween.Completed:Connect(function()
cdFrame.Visible = false
cdFrame.AnchorPoint = Vector2.new(0,0)
cdFrame.Position = UDim2.new(0,0,0,0)
cdFrame.Size = UDim2.new(1,0,1,0)
cdFrame.Finished:Play()
end)
`