Tween only works once

So I am making a tool that makes a frame tween size when you click it but if you click it one time it works but if I click it again it doesn’t. Also I want it so that it adds up the random numbers to the frame size already. which is {0.808, 0},{0, 0}

script:


local DrinkPart = script.Parent
local Drink = script.Parent.Parent

local Gui = player.PlayerGui:WaitForChild("DrinkGui")
local ProgressFrame = Gui.Background:WaitForChild("DrinkProgress")

local waitT = math.random(1.2,3.5)
local sizeRan = math.random(0.1,0.6)

Gui.Background.Visible = false

Drink.Equipped:Connect(function()
	Gui.Background.Visible = true
end)

Drink.Unequipped:Connect(function()
	Gui.Background.Visible = false
end)

local function tweenProgressFrame()
	ProgressFrame:TweenSize(UDim2.new(0.808,0,math.random(0.1,0.3)+math.random(0.1,0.4),0),
		Enum.EasingDirection.InOut,
		Enum.EasingStyle.Quad,
		wait(waitT)
	)
end

Drink.Activated:Connect(function()
	
	tweenProgressFrame()
	
	wait(1)
	
	player.leaderstats.Drink.Value += math.random(5,25)
	
end)

The issue may lay on the fact that math.random()cannot handle decimals, you should have whole numbers instead.
To make them decimals, you can do this:

local sizeRan = math.random(1,6)
local trueSizeRan = sizeRan/10 --in this case since you wanted .1 all the way to .6
1 Like