Hi guys, so I am making an intro GUI and I want to have a frame tween linearly at the end of the intro. However, instead of doing a tween, it just 'pops' straight into position, which doesn't look right.
Here is my script (all variables are accounted for):
if game.Players.LocalPlayer.IntroDone.Value == true then return end
game.ContentProvider:Preload(script:WaitForChild("LoadingGUI").Intro.ImageLabel.Image)
game.StarterGui:SetCoreGuiEnabled("All", false)
local screen = script:WaitForChild("LoadingGUI"):Clone()
screen.Parent = game.Players.LocalPlayer.PlayerGui
local string1 = "AiMProductions presents..."
local string2 = "With help from JulianRobotnik and Spongocardo."
wait(2)
repeat wait() until game.ContentProvider.RequestQueueSize >= 0
screen.Dash:Play()
for i = 1,0,-0.02 do
wait(.01)
screen.Intro.ImageLabel.Position = UDim2.new(i,-90,1,-90)
end
screen.Intro.ImageLabel.Position = UDim2.new(0,-90,1,-90)
wait(.25)
screen.Intro.Present.Text = string1
screen.Intro.Present.Help.Text = string2
screen.Woosh:Play()
screen.Intro.Present:TweenPosition(UDim2.new(0,0,0,0),"Out","Quad",(screen.Woosh.TimeLength - .5))
repeat wait() until screen.Intro.Present.Position.X.Scale >= 0
wait(.5)
for i = 1,0, -0.05 do
wait(.075)
screen.Intro.Present.Help.TextTransparency = i
end
wait(.75)
screen.Woosh:Play()
screen.Intro.Present:TweenPosition(UDim2.new(1,0,0,0),"Out","Quad",(screen.Woosh.TimeLength - .5))
repeat wait() until screen.Intro.Present.Position.X.Scale >= 1
wait(.25)
for i = 0,1,0.05 do
wait(.075)
screen.Intro.BackgroundTransparency = i
end
screen.Intro.BackgroundTransparency = 1
screen.Intro.Present.TextTransparency = 1
screen.Intro.Visible = false
wait(1.5)
screen.Parent.MainPage.Menu:TweenPosition(UDim2.new(0,0,0,0),"Out","Linear",1,true,function()
screen.Parent = nil
game.Players.LocalPlayer.IntroDone.Value = true
end)
So, at the end, it waits 1.5 seconds before doing a linear tween that lasts a second and sets the parent of the screen variable to nil and sets the IntroDone value in the player to true. However, the tween animation doesn't play and it just appears in the correct position.
Is this a ROBLOX bug or is there some error in my coding? Any help is appreciated, thanks.
