-
What do you want to achieve? I want to make the whole menu fade away when i click the play button.
-
What is the issue? The frame will not fade away with the rest.
As you saw in the video everything disappeared except for the background (the frame in question) then cuts to the game (The script disabled the ScreenGui) -
What solutions have you tried so far? I’ve changed the script a little and restarted studio.
Here is my script:
local ts = game:GetService("TweenService")
local frame = game.Players.LocalPlayer:WaitForChild("PlayerGui"):WaitForChild("Load"):WaitForChild("Frame")
local tweenInfo = TweenInfo.new(
1,
Enum.EasingStyle.Quint,
Enum.EasingDirection.Out,
0,
false,
0
)
local tween = ts:Create(frame, tweenInfo, { Transparency = 1 }) --This is the part where the script fades the background.
local tween2 = ts:Create(frame.Menu.plau, tweenInfo, {ImageTransparency = 1})
local tween3 = ts:Create(frame.Menu.plau, tweenInfo, {BackgroundTransparency = 1})
local tween4 = ts:Create(frame.Menu.plau.TextLabel, tweenInfo, {TextTransparency = 1})
local tween5 = ts:Create(frame.Menu.creduts, tweenInfo, {Transparency = 1})
local tween6 = ts:Create(frame.Menu.title, tweenInfo, {Transparency = 1})
local tween7 = ts:Create(frame.Menu.option, tweenInfo, {Transparency = 1})
local tween8 = ts:Create(frame.Menu.rgt, tweenInfo, {Transparency = 1})
local tween9 = ts:Create(frame.Menu.TextLabel, tweenInfo, {Transparency = 1})
--script.Parent.MouseEnter:Connect(function()
--end)
--script.Parent.MouseLeave:Connect(function()
--end)
script.Parent.MouseButton1Click:Connect(function()
--game.ReplicatedStorage.anchor:FireServer(game.Players.LocalPlayer)
tween:Play() --This is the part where it plays the tween when the button is clicked
tween2:Play()
tween3:Play()
tween4:Play()
tween5:Play()
tween6:Play()
tween7:Play()
tween8:Play()
tween9:Play()
task.wait(1)
--game.ReplicatedStorage.GiveWeapon:FireServer(game.Players.LocalPlayer)
game.Players.LocalPlayer:WaitForChild("PlayerGui"):WaitForChild("Load").Enabled = false
end)