Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Clicking a TextButton doesn't do anything?

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)

6 comments

0

Does it read "Button Clicked" in the output?

0

Nope.

0

Is "Choice1" the text button?

0

Yeah. The "Left" is the TextBox.

0

Shouldn't be "script.Parent.LFrame.Choice1.MouseButton1Down:connect(function()" then?

0

i feel like an idiot. Thanks for catching that, lol!

1 answer

✓ Accepted answer
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)

1 comment

0

That is the exact same script that I posted..

This discussion is preserved as it was. New answers, comments, and votes are closed.