function FindPlayer(userName)
for _, Player in ipairs(game.Players:GetPlayers()) do
if string.lower(Player.Name) == string.lower(userName) then
return Player
end
end
end
I get this error: bad argument #1 to 'lower' (string expected, got Object) Help?

2 comments
you're passing an Object in the userName variable. i assume userName will be a player. check where you fire the function.
it's called an argument