Simple ImageLabel Tween not working

I’m trying to just tween an image label, and have the tween on a loop until the game is fully loaded… It has no errors at all, so I don’t understand what I did wrong.

local UI = script.Parent.ImageLabel2.ImageLabel

local isit = true



while isit == true do
	GameStarting()
	task.wait(2.1)
	GoBack()
end

if game:IsLoaded() then
	task.wait(4)
	script.Parent:Destroy()
end


function GameStarting()
	UI:TweenSize(UDim2.fromScale(0.197, 0,0.134, 0), Enum.EasingDirection.In, Enum.EasingStyle.Back, 2)
end
function GoBack()
	UI:TweenSize(UDim2.fromScale(0.124, 0,0.084, 0), Enum.EasingDirection.In, Enum.EasingStyle.Back, 2)
end

I know you are using TweenSize; but, maybe you could try using TweenService and seeing if it still doesn’t work.

local UI = script.Parent.ImageLabel2.ImageLabel
local TweenService = game:GetService('TweenService')

local tweenInfo = TweenInfo.new(2)
local tweensize1 = UDim2.new(0.153, 0, 0.107 , 0)
local tweensize2 = UDim2.new(0.124, 0,0.084, 0)
	
function loadingtween()
	local tween1 = TweenService:Create(UI, tweenInfo, {Size = tweensize1})
	local tween2 = TweenService:Create(UI, tweenInfo, {Size = tweensize2})
	
	while true do
		tween1:Play()
		wait(2.1)
		tween2:Play()
	end
end

still doesnt work

1 Like

omg i forgot to call the function, hold on

1 Like

Did the tween work? Just wondering.

Yes, it worked. Thanks for suggesting swapping to tween service.

1 Like

ik this is solved… but, i am kinda needing help with one of my tweens, do you think you can help me?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.