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

TextLabel not showing up?

Asked by 9 years ago

I made a script to show a GUI changing texts giving people, who click the "Play"button, information. It used to work before, now it won't. After I changed one of the texts, it broke.

All the GUIs start off Visible.

mouse = game.Players.LocalPlayer:GetMouse()
txt = script.Parent.TextLabel
script.Parent.MouseButton1Click:connect(function()
    game.Players.LocalPlayer.CameraMaxZoomDistance = 0.5
    script.Parent.Visible = false
    txt.Text = "Okay, " ..game.Players.LocalPlayer.Name.. "."
    wait(5)
    txt.Text = "Your task is simple."
    wait(5)
    script.Parent.Sound:Play()
    txt.Text = "Run from him."
    wait(3)
    txt.BackgroundTransparency = 0.1
    txt.TextTransparency = 0.1
    wait(0.0000000001)
    txt.BackgroundTransparency = 0.2
    txt.TextTransparency = 0.2
    wait(0.0000000001)
    txt.BackgroundTransparency = 0.3
    txt.TextTransparency = 0.3
    wait(0.0000000001)
    txt.BackgroundTransparency = 0.4
    txt.TextTransparency = 0.4
    wait(0.0000000001)
    txt.BackgroundTransparency = 0.5
    txt.TextTransparency = 0.5
    wait(0.0000000001)
    txt.BackgroundTransparency = 0.6
    txt.TextTransparency = 0.6
    wait(0.0000000001)
    txt.BackgroundTransparency = 0.7
    txt.TextTransparency = 0.7
    wait(0.0000000001)
    txt.BackgroundTransparency = 0.8
    txt.TextTransparency = 0.8
    wait(0.0000000001)  
    txt.BackgroundTransparency = 0.9
    txt.TextTransparency = 0.9
    wait(0.0000000001)
    txt.BackgroundTransparency = 1
    txt.TextTransparency = 1
    mouse.Icon = "rbxassetid://240302586"
end)

There is nothing in the output. Could somebody help me out with this?

0
Line 05, you make it invisible. Perci1 4988 — 9y
0
That's the button going invisible. I want the button invisible. Grenaderade 525 — 9y

1 answer

Log in to vote
2
Answered by
Merely 2122 Moderation Voter Community Moderator
9 years ago

To clarify Perci1's answer, on line 5 you set the Frame's Visible property to false, so any children of the frame will be completely hidden. After that you are changing the Transparency properties of a TextLabel inside the Frame, but of course you're never going to see the changes because the Frame has to be Visible in order to see the TextLabel.

0
By the way, it's not in a frame. ._. Grenaderade 525 — 9y
0
Well whatever object it's in. Merely 2122 — 9y
Ad

Answer this question