Image Lable tween

You can write your topic however you want, but you need to answer these questions:

  1. I want to make an image label tween size

  2. When I tween the image label it doesn’t change at all

  3. I’ve tried Spawn(Function() to skip a loop ahead of the tween


spawn(function()
while true do
	wait()
	if Image == true then
		wait()
		script.Parent.Pic:TweenSize(UDim2.new(0, 190,0, 200),Enum.EasingDirection.InOut, Enum.EasingStyle.Quad,5)

		wait(5)
		script.Parent.Pic:TweenSize(UDim2.new(0, 200,0, 218),Enum.EasingDirection.InOut, Enum.EasingStyle.Quad,5)
		
		else
			wait()
		script.Parent.Pic:TweenSize(UDim2.new(0, 200,0, 218),Enum.EasingDirection.InOut, Enum.EasingStyle.Quad,5)
		end
	end
	end)

This is my first time posting so sorry if it sounds unclear, Thanks!

after 5 type ,true
this overrides any tweens that are playing that might fix it

btw dont use spawn use task.spawn (task is a more optimized library) and if that doesn’t work try

task.delay(0, function()
	while task.wait() do
		if Image then

			task.wait()
			script.Parent.Pic:TweenSize(UDim2.new(0, 190,0, 200), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, 5, true)

			task.wait(5)
			script.Parent.Pic:TweenSize(UDim2.new(0, 200,0, 218), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, 5, true)

		else

			task.wait()
			script.Parent.Pic:TweenSize(UDim2.new(0, 200,0, 218), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, 5, true)

		end
	end
end)

Ok thanks ill try that ill let you know if it works!

It didn’t work but I can show you the while script if that helps

local ANCHORpoint = Vector2.new(0.5, 0.5)
local TweenService = game:GetService("TweenService")
local MouseHover = false
local Image = false

script.Parent.AnchorPoint = ANCHORpoint



--when mosue enters
script.Parent.MouseEnter:Connect(function()
	TweenService:Create(script.Parent,TweenInfo.new(0.1),{BackgroundColor3 = Color3.new(0, 0.258824, 0.780392)}):Play()
	Image = true
MouseHover = true
	local tween = script.Parent:TweenSize(UDim2.new(0, 250,0, 382),Enum.EasingDirection.InOut, Enum.EasingStyle.Quad,0.1)

end)


--when mouse leaves 
script.Parent.MouseLeave:Connect(function()
	Image = false
	MouseHover = false
	TweenService:Create(script.Parent,TweenInfo.new(0.1),{BackgroundColor3 = Color3.new(0.133333, 0.133333, 0.133333)}):Play()
	script.Parent:TweenSize(UDim2.new(0, 230,0, 362),Enum.EasingDirection.InOut, Enum.EasingStyle.Quad,0.1)
end)




--checks

while true do
wait()
	if MouseHover == true then 
		Image = true
		TweenService:Create(script.Parent,TweenInfo.new(0.1),{BackgroundColor3 = Color3.new(0, 0.258824, 0.780392)}):Play()
	script.Parent:TweenSize(UDim2.new(0, 250,0, 382),Enum.EasingDirection.InOut, Enum.EasingStyle.Quad,0.1)
	else
		Image = false
		TweenService:Create(script.Parent,TweenInfo.new(0.1),{BackgroundColor3 = Color3.new(0.133333, 0.133333, 0.133333)}):Play()
	script.Parent:TweenSize(UDim2.new(0, 230,0, 362),Enum.EasingDirection.InOut, Enum.EasingStyle.Quad,0.1)
	
end
	end






--the image sizing

	while true do
		wait()
		if Image == true then
			wait()
			script.Parent.Pic:TweenSize(UDim2.new(0, 190,0, 200),Enum.EasingDirection.InOut, Enum.EasingStyle.Quad,5,true)

			wait(5)
			script.Parent.Pic:TweenSize(UDim2.new(0, 200,0, 218),Enum.EasingDirection.InOut, Enum.EasingStyle.Quad,5,true)

		else
			wait()
			script.Parent.Pic:TweenSize(UDim2.new(0, 200,0, 218),Enum.EasingDirection.InOut, Enum.EasingStyle.Quad,5,true)
		end
	end

Thanks!

i cant necessarily do much with a ton of code i dont have any context or explaining for
was there any errors?
also next time you need more help please @ or reply to the person who’s helping you

Ok thanks for letting me know.