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

Trying to make a Keypad system not working?

So I have a game and i'm trying to make a secret room, that is activated with the correct keypad, but whenever i press the button in the surfacegui, it replaces the current text with number, even though the code is suppose to be multiple digits. I'm not going to list every number button, so here's #1:

script.Parent.MouseButton1Click:Connect(function()
	script.Parent.Parent.TextBox.Text = .."1"
end)

This TextBox and TextButton are in a surfacegui inside a part, and the local script in inside of the textbutton.

5 comments

0

That would error. You're trying to concatenate nothing to the string "1".

0

Concatenate a blank string. "" You're not concatenating it to anything.

0

what does that mean

0

Put replace "1" to ("1")

0

No, wrapping strings in brackets is redundant. Its only use is in math.

1 answer

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