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!
Closed as Non-Descriptive by hiimgoodpack and WideSteal321
This question has been closed because its title or content does not adequately describe the problem you are trying to solve.
Please ensure that your question pertains to your actual problem, rather than your attempted solution. That is, you were trying to solve problem X, and you thought solution Y would work, but instead of asking about X when you ran into trouble, you asked about Y.
Why was this question closed?