So I made a GUI, but I need to know how to make it change it's text back to "Decal ID Here", when a player stops typing on it, and clicks on something else.
COMMUNITY QUESTION
How do you make a script that changes back to text when you click off of it?
3 answers
use this:
while true do if script.Parent.Text == " " then script.Parent.Text = "Decal ID Here" end end
Thats the script text ^^^, paste that into script, well type that into script. then put script inside the TextBox.
What he said ^
1 comment
0
Didn't work
Try this, it is to be put in a local script under the TextBox.
script.Parent.FocusLost:connect(function(enterPressed)
if enterPressed then
print("Focus was lost because enter was pressed!")
end
end)
Source http://wiki.roblox.com/index.php?title=FocusLost_%28Event%29
2 comments
0
It isn't a textlabel it's a textbox...
0
Oh, sorry. I meant TextBox, let me do a quick edit.
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
while true do if script.Parent.Text == "" then script.Parent.Text = "Decal ID Here" end end
Didn't work.
Hmm it should, maybe put an enter button adn make a script on that.