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)

3 comments

0

This post is a bit vague

0

I updated it, explaining it a bit more

0

You just took my answer to your previous question and re posted it in a new question.