Need help, fade in and out gui frame

Hi how to make fade in and out gui frame. when player press gui button.

(like this:
robloxapp-20230430-1736418.wmv (997.6 KB))

1 Like

You need to use TweenService.
Docs: UI Animations | Roblox Creator Documentation

make use of tweenservice
here’s an example

local ts = game:GetService("TweenService")
local button = script.Parent
local twinfo = TweenInfo.new(0.4, Enum.EasingStyle.Quint, Enum.EasingDirection.InOut)

button.BackgroundTransparency = 0
local goal = {BackgroundTransparency = 1}
button.MouseButton1Click:Connect(function()
    ts:Create(button, twinfo, goal):Play()
end)
1 Like