Here is an example, https://gyazo.com/cf1a8d5960cb3c0f5204d0ffba81094c, the game can be found here, https://www.roblox.com/games/560789612/Riscord-UI-v0-1-5, I have been trying to figure out how to do something like this for a while but I can't figure out how to, would appreciate some help, thank you.
✓ ANSWER ACCEPTED
How to change a TextBox's text into asterisks, like a password textbox?
1 answer
✓ Accepted answer
The number of characters in a string can be counted using #string, so we can use this to iterate through each character in the string, replace it with an asterisk, and repeat until we get to the end. After that, just replace the TextBox text with the string we just made. We'll use the FocusLost event to update the text.
TextBox = script.Parent
local replacer = "*"
TextBox.FocusLost:Connect(function()
local string = TextBox.Text
local newString = ""
for i = 1, #string do
newString = newString .. replacer
end
TextBox.Text = newString
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
