I've been trying to fix this part that checks if there is a word then return with true or false with string.find() in a function, here is the part of the script:

	    local function find1(word)
		    local f2c = frame2:GetChildren()
			for i = 1,#f2c do 
				local c = f2c[i]
				return string.find(c.Text,word)
            end
		end
	    local function find2(word)
		    local f2c = frame2:GetChildren()
			for i = 1,#f2c do 
				local c = f2c[i]
				return string.find(c.Text,word)
            end
		end

		if find1(tostring(amount)) == nil and find2(stat) == nil then

It always returns nil even tho there is the texts in the "c.Text" part.

If anyone could help me and describe what i did wrong here then i would be thankful!

2 comments

0

Try getting debug information yourself and tell us what you put in the text boxes before posting.

0

how do i do that?