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

My Textbutton GUI isn't changing text or transparency?

Hey everyone, I'm trying to make the text in my textbutton gui change transparency and change the message, but the script I wrote isn't working at all. I have no idea what is going wrong and it seems like it should work, but it isn't... any reason why? Script:

local textbox = script.Parent

wait(5)

for i = 1,10 do 
	wait(0.1)
	textbox.TextTransparency = textbox.TextTransparency + 0.1
end
textbox.Text = "(new text)"
for i = 1,10 do
	wait(0.1)
	textbox.TextTransparency = textbox.TextTransparency - 0.1
end
wait(5)

5 comments

0

Also, under starter GUI, the hierarchy is ScreenGUI > TextBox > LocalScript

0

I put the code in a codeblock. It is expect that you do this yourself next time https://forum.scriptinghelpers.org/topic/82/how-to-format-questions-answers-on-the-main-site

0

Why do you have arbitrary wait calls at line 3 and 14?

0

So the user has time to read the text on the screen before it changes

0

This code annoys me so much. I normally use for i = 1,10,1 do also, i subtract the transparency by .01 for a smoother transition...

1 answer

reads a few lines and finds the error. TextTransparency isn't a valid property of Text UI Objects. remove the word text and your issue is solved.

local textbox = script.Parent

wait(5)

for i = 1, 10 do 
    wait(0.1)
    textbox.Transparency = textbox.Transparency + 0.1
end
textbox.Text = "(new text)"
for i = 1, 10 do
    wait(0.1)
    textbox.Transparency = textbox.Transparency - 0.1
end

wait(5)

Unless, your trying to connect to another text child inside explorer, this should work.

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