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!