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

How do I disable typing in text boxes?

I cant find a property for this, so how?

3 comments

0

Use a textlabel.

0

DO NOT USE A TEXTLABEL, look at my answer

0

If you meant to use a TextLabel, use a TextLabel. If you're disabling a textbox for some other reason, follow devChris's answer.

2 answers

✓ Accepted answer

The TextBox has an event called Focused which runs every time someone focuses their mouse on the box. Using this, we can also unfocus it when this event is called, so it gives an illusion of a disabled textbox.

local textBox = yourTextBoxPathHere -- (for example, gui.TextBox)
textBox.Focused:connect(function() -- Event called
	textBox:ReleaseFocus() -- Makes it disable typing
end)

By using a TextLabel. Whoops, excuse my while I fix all of my GUI's.

3 comments

0

It's the only way I know of.

0

This is a terrible and time consuming way, look at my answer.

0

Eh, did it now!

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