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

Why isnt the text label showing up when the frame fades out?

Asked by 1 year ago

Im trying to make text to appear after the screen fades out into black but nothing is showing up.

local On = true

function touched(Part)
    if On == true and Part.Parent.Humanoid~=nil then
        On = false 


        local n = Part.Parent.Name

        local a = Instance.new("ScreenGui",game.Players[n].PlayerGui)

        local b = Instance.new("Frame",a)

        a.IgnoreGuiInset = true

        b.BackgroundColor3 = Color3.new(0,0,0)

        b.Size = UDim2.new(1000,1000,1000,1000)

        b.BackgroundTransparency = 1

        repeat 


            b.BackgroundTransparency = b.BackgroundTransparency - 0.05
            wait(0.1)

        until b.BackgroundTransparency <= 0


        wait(1)
        game.StarterGui.ScreenGui.e.TextTransparency = 0

        repeat 

            b.BackgroundTransparency = b.BackgroundTransparency + 0.05
            wait(0.1)

        until b.BackgroundTransparency >= 1

        a:Remove()
        On=false

    end
end

1 answer

Log in to vote
0
Answered by
Lakodex 711 Moderation Voter
1 year ago

This code is torture. Look up TweenService, and also variables.

The fix to your code is creating a text object.

0
Yeh lol I just changed it completely now SoulHomie23 6 — 1y
Ad

Answer this question