I am attempting to make the GUI fade away when a button is pressed, however: The expected behaviour is not happening and instead the GUI destroys itself without fading away, however the text still prints.
The expected behaviour is to make the GUI fade away and then destroy itself.
The script:
local Players = game:GetService("Players").LocalPlayer
local TweenService = game:GetService("TweenService")
local TV = script.Parent
Players.CharacterAppearanceLoaded:Connect(function(player)
local StartButton = script.Parent.Image.Continue
StartButton.Text = "Start"
script.Parent.Transparency = 0
StartButton.MouseButton1Click:Connect(function()
repeat
script.Parent.Transparency += 0.1
script.Parent.Image.Transparency += 0.1
print("Transparency is Changing")
wait(0.1)
until script.Parent.Transparency >= 1
script.Parent:Destroy()
end)
end)