So I have this script for Cooldowns.
And right now I am using a for loop to change the size of the frame.
And it is well, as you can guess. It really un-smooth.
So how would I transfer this to tween service?
local event = game:GetService('ReplicatedStorage'):FindFirstChild('CooldownUI')
event.OnClientEvent:Connect(function(AttackNumber,CDTime)
local frame = script.Parent:FindFirstChild(AttackNumber)
print(frame.Name..' Has been found! WOOP WOOP')
local cdFrame:Frame
cdFrame = frame.CDF
cdFrame.Visible = true
local waitTime = CDTime / 10
print(waitTime)
for size = 1, 0,-0.1 do
cdFrame.Size = UDim2.new(1,0,size,0)
wait(waitTime)
end
cdFrame.Visible = false
print('Cooldown over')
end)
Yes I am using Scale, not Offset.
I just need to tween the size TLDR