So, in my game, this is for the lobby. When they make a lobby, they can make it 1 - 4 players. But text boxes can have letters, numbers, and lots of them. Is there a way to make it only be able to have 1 - 4, just once. So not 11 22 33, etc... I found some code, but it doesn't work.
local TextBox = script.Parent TextBox:GetPropertyChangedSignal("Text"):Connect(function() if tonumber(TextBox.Text) then script.Parent.Number.Value = script.Parent.Text else TextBox.Text = "1" end end)
I found a different way to do it! Thanks to Utter_Incompetence.
https://scriptinghelpers.org/questions/97190/is-there-a-way-to-see-when-a-text-boxes-text-is-changed