Roblox ingame Tablet | Password System | Help Needed

I have a tablet and you are required to input a password I was wondering if anyone knew how to make it show stars insted of the password that the user inputs like roblox when logging in?

Please Post script examples also as I find explinations very comfusing due to my autism

@usedSpxse May reply he is my project manager

This is for project popsiz

Signed:
intorsetorpolice1 / Kieranl29
Popsiz Development Department

2 Likes

wdym? like a physical tablet? and changing the password screen?

1 Like

You’re not allowed to make a system where people have username and password , simply because someone could put their real password and you could get theirs from the datastore, and cause you get into troubles.

username system is fine, but dont completely hide their real username.

2 Likes

No, on roblox we have a UI that looks like an ipad or a tablet. We’re trying to make a sign in system with a password (3 digit) but we want when people are typing in the password it covers up the typed in characters with a *.

2 Likes

I can agree but like what if hes making something like, windows login where you put something like

Username: John
Password : 1234
4 Likes

You could use string.gsub to replace each letter/digit with a *.

3 Likes

They CANT set their own passwords its set by us

1 Like

Oh alright, then it is fine.
Here is how you could do it

You could use string.gsub to replace each letter/digit with a * .

Example:

local password = "123"
local new = password:gsub("%d","*")
print(new) --> ***
3 Likes

Could you send an example of how to do this please?

1 Like
local txt = script.Parent.TextBox
local passwordtest = string.gsub(txt.Text)

may have forgot some things

3 Likes

Would you run this when someone changes the text in the box?

1 Like

Here is an example how you could do this
the %d will detect any digit in the text/string, and replace it with *.

4 Likes

Well you’re going to have to make it so if the player gone out of focus it changes to the stars (possibly)

2 Likes

We want it to change as they type it tho.

1 Like

works

4 Likes
textBox:GetPropertyChangedSignal:Connect(function()
    local text = textBox.Text
    local endText = ''
    for i=1,string.len(text) do
        endText= endText..'Q'
    end
    textBox.Text = endText 
end)

this should work

5 Likes

Did not work due to we need to see what is inputted for this to work and for it to compare the password to the correct password internally.
Plus it needs to be stored so we can compare them and let them in or say the password is incorrect

2 Likes

This did work however when you’re logging into something you know how it shows the last character you typed… How could we do that?

1 Like

try instead

textBox:GetPropertyChangedSignal:Connect(function()
    local text = textBox.Text
    local endText = ''
    for i=1,string.len(text)-1 do
        endText= endText..'Q'
    end
    local str = string.split(text)[string.len(text)]
    endText = endText..str
    textBox.Text = endText 
end)

check the password in a string value?

3 Likes