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

Clicking a TextButton doesn't do anything?

Asked by 8 years ago

How this is set up is I have a textbutton completely covering a textbox, and I want to make the textbutton vanish when clicked, and the transparency of the text box to go from 0 to 1 in .05 increments. It doesn't come up with any error, but it doesn't work. I don't really get for loops yet, but it doesn't even do the print, so it's not even getting past the function. But that's exactly how the wiki says to do it, so I'm really confused.

Sorry if I'm just doing something completely wrong, I'm just starting to learn scripting.

script.Parent.LFrame.Left.MouseButton1Down:connect(function()
    print("Button Clicked")
    script.Parent.LFrame.Choice1.Visible = false
    for i = 0,1,.01 do
        script.Parent.LFrame.Left.TextTransparency = i
        wait(.01)
    end
end)
0
Does it read "Button Clicked" in the output? ClassicTheBlue 65 — 8y
0
Nope. DemonicWolf943 5 — 8y
0
Is "Choice1" the text button? ClassicTheBlue 65 — 8y
0
Yeah. The "Left" is the TextBox. DemonicWolf943 5 — 8y
View all comments (2 more)
0
Shouldn't be "script.Parent.LFrame.Choice1.MouseButton1Down:connect(function()" then? ClassicTheBlue 65 — 8y
0
i feel like an idiot. Thanks for catching that, lol! DemonicWolf943 5 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago
script.Parent.LFrame.Left.MouseButton1Click:connect(function()
    print("Button Clicked")
    script.Parent.LFrame.Choice1.Visible = false
    for i = 0,1,.01 do
        script.Parent.LFrame.Left.TextTransparency = i
        wait(.01)
    end
end)
0
That is the exact same script that I posted.. DemonicWolf943 5 — 8y
Ad

Answer this question