Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would I properly tween and fade?

Asked by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
10 years ago

I've tried the fading several different ways, but it just pops away. Like I destroy it before the fade.

Also, the tweening, it's not smooth. It just pops like I changed the Visible property

a = game.Lighting.Welcome_GUI

game.Players.PlayerAdded:connect(function(p)
    p:WaitForChild("PlayerGui")
    a:clone().Parent = p.PlayerGui
    wait(2)
    p.PlayerGui.Welcome_GUI.ImageLabel:TweenPosition(UDim2.new(0,0,0,0),"Out","Quad",.99)
    repeat
        p.PlayerGui.Welcome_GUI.ImageLabel.ImageTransparency = p.PlayerGui.Welcome_GUI.ImageLabel.ImageTransparency + 0.1
        wait(0.01)
    until
    p.PlayerGui.Welcome_GUI.ImageLabel.ImageTransparency == 1
    p.PlayerGui.Welcome_GUI:Destroy()
end)

1 answer

Log in to vote
0
Answered by 10 years ago
a = game.Lighting.Welcome_GUI:Clone()

game.Players.PlayerAdded:connect(function(p)
    p:WaitForChild("PlayerGui")
    a.Parent = p.PlayerGui
    g = p.PlayerGui.Welcome_GUI
    wait(2)
    g.ImageLabel:TweePosition(UDim2.new(0,0,0,0), "Out", "Quad", 1)
    for i = 1,10 do
        wait(.1)
        g.ImageLabel.Transparency = g.ImageLabel.Transparency +.1
    end
    g:Destroy()
end)

I think this should work.

0
No luck. I saw that you had some minor bugs, so I did fix those, but still didn't work. Thanks for trying. Shawnyg 4330 — 10y
Ad

Answer this question