Hello every one !
So today i am making my third person code.
In my code i need to compare the name of child i want and the name of each children(GetChildren())
but i have got this error. when i try to compare their name.
CODE:
function Script:GetChildByName(nameRequest)
for i = 0 , self.entity:CountChildren() -1 do
local ent = self.entity:GetChild(i)
local entName = ent:GetKeyValue("name")
if entName == nameRequest then
System:Print(nameRequest + " has been found !")
return ent
end
end
return nil
end