How to Make this Billboard GUI animated?

Hi there,

I was wondering how I could make a billboard GUI animated.

I want it to animate when a button is clicked, when it is clicked it animates the billboard gui to shrink. Then another billboard gui zooms in the same spot after one second has passed.

My GUI:

You can use TweenService to accomplish this.

But, I do not know how to use TweenService.
I’ve tried before and I just struggled.

Tis why I gave you the API reference. I’ll give you a sample code

local GUI = -- your gui
local frame = -- the frame
local button = -- le button
local TweenService = game:GetService('TweenService')
local TI = TweenInfo.new (0.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out) -- just and example

  -- gave those variables as examples you'll define them as needed.

local Size = {Size = UDim2.new(--choose)} -- this will be the size that shrinks
local Size2 = {Size = UDim2.new(--choose)} -- since you want another gui to zoom in this will be zooming in

local example = TweenService:Create(--gui object, -- tweeninfo, the size) -- This is how you set up the tweening. As you progress you can customize all the object you want to tween to your liking.

guiObject.MouseButton1Down:Connect(function()
example:Play()
end)
5 Likes

sorry
what do i do for tweeninfo

Exactly what it says. You put the Tweeninfo and the size.

Use the variables I defined for you.

(guiobject, TI, Size)

1 Like

I got it thanks! :slight_smile:

1 Like