What do you want to achieve? i want the ui fade in if visible is true and fade out if its not
GameModes.ModeTitle.Background and GameModes.Modes.Background must fade with the uistroke too
What is the issue? i cant do it
What solutions have you tried so far? none
local function playEntered()
currentCamera.CFrame = menuCamera.CFrame
end
playButton.MouseButton1Click:Connect(function(player)
task.wait(0.01)
local gameModes = script.Parent.MainMenu:WaitForChild("GameModes")
gameModes.Visible = not gameModes.Visible
end)
Well, you’ll have to tween the BackgroundTransparency property - you cannot animate with the visibility.
local ts = game:GetService("TweenService")
local info = TweenInfo.new(
1, --duration in seconds
Enum.EasingStyle.Sine, --animation method,
Enum.EasingDirection.Out, --how the EasingStyle should be applied
0, --repeat count
false, --reverses
0 --delay time
)
local openTween = ts:Create(frame, info, {BackgroundTransparency = 0})
local closeTween = ts:Create(frame, info, {BackgroundTransparency = 1})
--then...
openTween:Play()
closeTween:Play()
You would make tweens for each individual element, potentially storing them as an array.
You said you looked for nothing before making this - please do some research next time.
Here’s the documentation: TweenService | Documentation - Roblox Creator Hub