Need help with cooldown script

I have a script that is fired when you use a powerup and is supposed to tween a bar that shows how much time is left on the cooldown.

Code
local rs = game:GetService("ReplicatedStorage")
local ShopEvents = rs:WaitForChild("ShopEvents")
local CooldownBar = rs:WaitForChild("Cooldown")
local player = game.Players.LocalPlayer
local CooldownGUI = player.PlayerGui:WaitForChild("CooldownGUI")
local CDTimer = CooldownGUI.PowerUpCDValue
local CooldownEvent = ShopEvents.PowerUpCooldown
local GlobalCDValue = 15
local CooldownGUI = script.Parent

CooldownEvent.OnClientEvent:Connect(function()
	CooldownBar.Parent = CooldownGUI
	while CDTimer.Value > 0 do
	print("This Works")
	wait()
		for i = GlobalCDValue,0,1 do
		print("This also works")
		wait(1)
		CDTimer.Value = i
		CooldownBar.CDBar:TweenSize(
			UDim2.new(CDTimer.Value/GlobalCDValue,0,1,0),
			Enum.EasingDirection.Out,
			Enum.EasingStyle.Quad,
			true,
			.5
			)
			if CDTimer.Value <= 0 then
				CooldownBar:Destroy()
			end
		end
	end
end)

The problem is it completely skips over the for loop and just acts as if I typed out a blank while loop and it just spam prints “This works!” which eventually causes the client to lag horrendously. I’ve already tried removing the while loop but the bar still does nothing and the value still stays at 15. I can provide the powerup script or any other details that may be required. Thanks.

Nevermind. It was skipping over it because I needed to use a negative increment if I want the for loop to go from a higher number to go to a lower number.