How to make a Tween/Animated GUI on Roblox Studio

Опубликовано: 16 Октябрь 2024
на канале: StudioTutorialzYT
17,372
331

#RobloxStudioTutorials

---- Songs ----

Intro Song Link: chill anthem - BROCKBEATS:    • chill anthem  

Background Music: Blue Dream by Youtube Music

---- Profile Link ----

https://web.roblox.com/users/97907289...

---- Script ----

local frame = script.Parent.Frame ---------------- your frame
local openclose = script.Parent.OpenClose -------- your button

frame.Size = UDim2.new(0.188, 0,0.071, 0)

openclose.MouseButton1Click:Connect(function()
if frame.Size == UDim2.new(0.188, 0,0.071, 0) then

frame.Visible = true
frame:TweenSize(UDim2.new(0.514, 0,0.803, 0),Enum.EasingDirection.Out,Enum.EasingStyle.Back,0.2)
openclose.Text = "CLOSE" ---------- you can change this

elseif frame.Size == UDim2.new(0.514, 0,0.803, 0) then

frame:TweenSize(UDim2.new(0.188, 0,0.071, 0),Enum.EasingDirection.In,Enum.EasingStyle.Quint,0.15)
wait(0.13)
openclose.Text = "OPEN" ---------- you can change this
frame.Visible = false
end
end)