Good evening, so i was looking through this discord and stumbled across a video showcasing his pet inventory system. I happened to see his ui tweening and me being a ui designer I was curious to know what tweens he is using for his buttons and well as the frame. I’m not new to scripting and have dealt with tweening in the past, but I wanted to know what tweens he was using.
Question: What tweens are using in the video below?
maybe just set the main frame size to small? and then tween it to the original size and then make it small a little bit and then tween it back again to make the effect, and for the closing maybe just tween it to a smaller size and then just make it invisible
for the button, maybe also tween the height (y) a little smaller and then tween it back again to it’s original size?
For the frame tween, the creator was most likely set the anchorpoint of the frame to .5, .5 and tweened the UIScale inside the main frame from 0-1 with the Bounce easing style and a short time, probably about .2-.5 seconds.
For the HUD, they were most likely storing the original position and tweening on MouseEnter and MouseLeave. For example…
local Button = Button
local OriginalPosition = Button.Position -- Store the original position
local AdjustedPosition = OriginalPosition + UDim2.new(0,0,.05,0) -- Adjust the original position, we will use this when the button is hovered over
function Tween(Position)
game:GetService("TweenService"):Create(Button, TweenInfo.new(.2, Enum.EasingStyle.Quint), {Position = Position}):Play() -- Create and play a tween with preset info
end
Button.MouseEnter:Connect(function() -- When the mouse enters the button,
Tween(AdjustedPosition) -- tween it to the adjusted position
end)
Button.MouseLeave:Connect(function() -- When the mouse leaves the button,
Tween(OriginalPosition) -- tween it to the original position
end)