Turn text into symbol feedback loop

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want to create an effect where a player types into a TextBox and the text turns into bulletpoints (“•”), similar to a password system (There is no actual password and it’s only for asthetic purposes)

  2. What is the issue? Include screenshots / videos if possible!
    When I type into the textbox a single letter instead of it displaying a bulletpoint it creates a very long bulletpoint chain with the error. It seems to have a feedback loop where the GetPropertyChangedSignal gets activated, the script changes the text and then again GetPropertyChangedSignal activates, doing it all over again, I don’t know how to make it stop
    "Unable to assign property Text. Provided string length (531441) is greater than or equal to max length (200000) "

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I have looked for people who asked for similar systems, but they all say to use string.rep in the same way I used it.

This is the script I use to turn the letters into symbols

loginBox:GetPropertyChangedSignal("Text"):Connect(function()
	loginBox.Text = string.rep("•", #loginBox.Text)
end)

Help would be appreciated! Many thanks.

Instead, use the userinput service and whenever the player presses a key update the textbox

alternatively have a hidden textbox under a textlabel

1 Like

I managed to do it differently, thanks for the help anyways!

This is what I used, instead of using string.rep I decided to use gsub and replace every letter and number using “%w” with a asterisk!

loginBox:GetPropertyChangedSignal("Text"):Connect(function()
	local originalText = loginBox.Text
	local maskedText = originalText:gsub("%w", "*")
	loginBox.Text = maskedText
end)

Im pretty certain this still runs into a problem where it runs atleast twice per change as you are listening for a text change and then changing the text. Just be wary of that

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.