How do I make default capitalisation


I would like to know how to set the text entered in a TextBox all capitalised. Is there a way to do that? I have been surfing on the web to know how to do it and all I found was some JavaScript.


I would do it by connecting a changed event to its Text property, and then setting its text to its text capitalized.

local textbox = script.Parent
    if textbox.Text:upper() ~= textbox.Text then
        textbox.Text = textbox.Text:upper()

From my testing it seems to preserve the cursor position within the text, but if it didn’t, you could maintain it by using the CursorPosition property.

1 Like

Thanks I will try that out… (())