Basically get the Service and the TweenInfo
local tweenService = game:GetService("TweenService")
local info = TweenInfo.new(
.5, --duration
Enum.EasingStyle.Exponential,
Enum.EasingDirection.Out,
0, --repeat count
false, --reverse to it's original state
0 --delay (seconds)
)
and also get the buttons and animate it!
local frame = script.Parent
frame.shop.MouseEnter:Connect(function()
tweenService:Create(frame.shop, info, {Size = UDim2.fromOffset(274, 114)}):Play()
tweenService:Create(frame.settings, info, {Size = UDim2.fromOffset(274, 47)}):Play()
end)
frame.settings.MouseEnter:Connect(function()
tweenService:Create(frame.shop, info, {Size = UDim2.fromOffset(274, 57)}):Play()
tweenService:Create(frame.settings, info, {Size = UDim2.fromOffset(274, 80)}):Play()
end)
frame.shop.InputEnded:Connect(function()
tweenService:Create(frame.shop, info, {Size = UDim2.fromOffset(274, 57)}):Play()
tweenService:Create(frame.settings, info, {Size = UDim2.fromOffset(274, 47)}):Play()
end)
frame.settings.InputEnded:Connect(function()
tweenService:Create(frame.shop, info, {Size = UDim2.fromOffset(274, 57)}):Play()
tweenService:Create(frame.settings, info, {Size = UDim2.fromOffset(274, 47)}):Play()
end)
so yeah if you want to create a new Tween just do
tweenService:Create(
instance,
info, --tweeninfo
{--properties
Size = UDim.new(1, 0, 1, 0),
BackgroundTransparency = .5
Position = UDim.new(.5, 0, .5, 0)
}:Play() --ofc play it!
)
TweenService is more customizable since it has EasingStyle and EasingDirection and also applicable to most of the properties.
[idk how to explain so i just shared the code and you can ask]