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

How to fix output isn't printing anything even though the script constantly checks?

Hello there, I have a LocalScript here which is a child of a TextBox (Not a TextLabel), it's supposed to constantly check if the Textbox has the text "Aesthetical" of which will print "Aesthetical is correct!" whereas if it's the opposite it just prints "What bro" in an indefinite amount of times, because it is obviously a function

However it does not seem to work, how do I approach and fix this?

local text = script.Parent

local function trigger()
if text.Text == "Aesthetical" then
		print("Aesthetical is correct!")
	else
		print("What bro")
	end
end

3 answers

Try checking the properties of the TextBox

1 comment

0

What I'm trying to do is it constantly checks if the player types Aesthetical, if the player typed Aesthetical in the TextBox it prints that Aesthetical is correct, whereas if the player does not type Aesthetical it just keeps printing What Bro

Constantly Run the trigger function in a loop also i tested this in a local script and it worked and didn't break

Did you try actually CALLING the function?

local function MyFunction(Num)
	print(Num^Num) -- Num to the power of Num
end

MyFunction(5) -- will print 5*5*5*5*5

Just keep in mind you need to CALL YOUR FUNCTIONS by re-typing the name and ending it with your parenthesis and with your added parameters (if any)!

1 comment

0

Note; if you named your textbox "Text", it might not like it when you do [variable_name_leading_to_"Text"].Text

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