SebTDZ

Find Player Function

Jun 30th, 2019
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.34 KB | None | 0 0
  1. function FindPlayer(FindUser)
  2.     local findUser = string.lower(FindUser)
  3.     local inputsize = string.len(findUser)
  4.     for i, v in pairs(game.Players:GetChildren()) do
  5.         local NameLow = string.lower(v.Name)
  6.         if NameLow:sub(1, inputsize) == findUser:sub(1, inputsize) then
  7.             return v.Name
  8.         end
  9.     end
  10. end
Advertisement
Add Comment
Please, Sign In to add comment