I’ve got this function that is meant to return the player object when passed the nickname. There’s two players on the server : Semajnad and Feahlyx. When SGNAdminSit.GetObjectFromNick( “feahlyx” ) is used it doesn’t work. However if I take out return v and return false, it does work?
Can anyone point out what I’m doing wrong?
function SGNAdminSit.GetObjectFromNick( nick ) for k, v in pairs(player.GetAll()) do if string.lower(v:Nick()) == nick then print("THIS WORKED") return v else print("Not it " .. v:Nick() ) return false end end end