How to stop having table getting spammed?

image

script.Parent.TextBox.InputEnded:Connect(function()
	if script.Parent.TextBox.Text == not "" then
		--x
	else
		local num = script.Parent.TextBox.Text
		table.insert(PlayerGuesses, tostring(num))
		print(PlayerGuesses)
	end
end)

Whenever you click on it it just adds a blank space, it needs to just put the number that the player enters for their guess.

This is for a guessing system to see who’s number is closest to the selected number if anyone knows a more efficient way to get from client to server

You can use FocusLost. Alternatively, use a button to submit their answer to the server