Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I get this function to print correct?

This isn't my full script but this is the problem i can't resolve, even when the number 121 is typed in the Textbox it won't print correct.

Textbox = script.Parent

Textbox.Changed:Connect(function()
	if Textbox.Text == 121 then
		print('correct: '..Textbox.Text)
	else
		print('incorrect: '..Textbox.Text)
	end
end)

1 answer

✓ Accepted answer

This is probably because Textbox.Text is a string while 121 is a integer. You can try using tostring() on 121 or just make it a string from the very beginning.

2 comments

0

thanks

0

So glad I helped :D

This discussion is preserved as it was. New answers, comments, and votes are closed.