Hey.
I’m currently just making a little Menu UI for fun, and I wanted to have a sort of screen fade to black and back to make the menu look a bit cooler.
Though when tweening the Frame (already is black, is visible, the background transparency is 1 but gets tweened to 0, then back to 1)
it doesn’t work and neither does having the text color change a bit when the button is pressed.
there is zero errors being given though the clicking of the button is being detected and is moving to the next screen, without the tweens.
code:
--Variables TEXT Handler OneButton
local OneButton = game.Players.LocalPlayer.PlayerGui.ScreenGui.MainFrame.OneButton
local FadeFrameALL = game.Players.LocalPlayer.PlayerGui.ScreenGui.FadeFrameALL
local TweenService = game:GetService("TweenService")
local tweenInfo1 = TweenInfo.new(0.1, Enum.EasingStyle.Exponential, Enum.EasingDirection.In)
local tween1 = TweenService:Create(OneButton, tweenInfo1, {TextColor3=Color3.new(0.176471, 0.0117647, 0.0156863)})
local tweenInfo2 = TweenInfo.new(0.1, Enum.EasingStyle.Exponential, Enum.EasingDirection.In)
local tween2 = TweenService:Create(OneButton, tweenInfo2, {TextColor3=Color3.new(0.0980392, 0.0980392, 0.0980392)})
local tweenInfo3 = TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out)
local tween3 = TweenService:Create(FadeFrameALL, tweenInfo3, {BackgroundTransparency=(0)})
local tweenInfo4 = TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out)
local tween4 = TweenService:Create(FadeFrameALL, tweenInfo4, {BackgroundTransparency=(1)})
OneButton.MouseButton1Click:Connect(function()
print("clicked")
tween3:Play()
tween4:Play()
end)
the tween for 1 and 2 were removed so i can have less going on and it is a local script.