#How do I check a text box text for specific text?

36 messages · Page 1 of 1 (latest)

daring thistle
#

if textBox.Text == "text" then

#

you check either on focus lost

#

or on whatever interaction, but yeah you just ask what the text property is

plucky cedar
#

ive tired that

#

this is the script input is the text of the text box.

daring thistle
#

you did not

plucky cedar
#

How would i use focus lost

plucky cedar
scenic prism
plucky cedar
scenic prism
#

still, can you post the entire code or we cannot help

scenic prism
#

might have to do with the type of input, you could try

if Input == tonumber(code) then
...
#

since it seems like you are comparing a number to a string

plucky cedar
#

Alrigh I'll try it

scenic prism
#

print both values

#

print(Input,code)

#

right before the if statement

plucky cedar
#

I did

plucky cedar
scenic prism
#

gimme a sec in a meeting

scenic prism
plucky cedar
#

yes

#

the input is blank

scenic prism
#

thats your issue then, backtrack and look at why Input is nothing

plucky cedar
#

why would it be empty tho bc im typing into it

scenic prism
#

do you ever update it after its been typed into? use the focusended event

plucky cedar
#

how do i use it

#

where would i place it

#

its printing the values now

plucky cedar
gritty talon
#

While wait() do
If script.Parent.Text == "Hor*y" theb
Plr:Kick("20 Pushups soldier!!!)

gritty talon
#

Game cannot detect your text without reupdating like renderstepped,while wait,or changed