I have made a script in which I want it to check whether when a TextBox changes it checks whether what has been entered so far is a number and is greater than one, if not, it will say to enter the number again until clicked enter (Which I still need to add). However, whenever I change the TextBox in the game it doesn't print anything or do anything and I'm not sure why.
Code:
local racesCountText = game.StarterGui.racesCount.TextBox
racesCountText:GetPropertyChangedSignal("Text"):Connect(function()
if tonumber(racesCountText.Text) then
if racesCountText > 1 then
racesCount = racesCountText.Text
print("This is a valud number")
else
racesCountText.Parent.TextLabel.Text = "Please try and enter the number again, it has to be greater than one."
end
else
racesCountText.Parent.TextLabel.Text = "Please try and enter the number again, this isn't a valid nuber."
end
end)
