Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would I make this script make it so the text box can only have 1 number (Sudoku Game)?

Asked by
Knqe 23
4 years ago
Edited 4 years ago

Basically, there is a parent to this local script, which is a text box. I'm trying to make it so that it only shows numbers, but can only have one number in it. This script makes it so there are only numbers, but users can put more than one number, which I don't want.

function NumberValidation ()
    if tonumber(script.Parent.Text) ~= nil then
        return
        else script.Parent.Text = ""
    end
end

script.Parent:GetPropertyChangedSignal("Text"):Connect(NumberValidation)

0
This post is a bit vague Vinceberget 1420 — 4y
0
I updated it, explaining it a bit more Knqe 23 — 4y
0
You just took my answer to your previous question and re posted it in a new question. Prestory 1395 — 4y

Answer this question