Search
 
SCRIPT & CODE EXAMPLE
 

LUA

Roblox Get player by name

local function getPlayerFromName(name)
   -- loop over all players:
   for _, player in pairs(game:GetService("Players"):GetPlayers()) do
      -- if their name matches (case insensitive), return with that player:
      if player.Name:lower() == name:lower() then
          return player
      end
   end
   -- if we reach the end of the for-loop, no player with that name was found
end
Comment

PREVIOUS NEXT
Code Example
Lua :: roblox how to tween part color 
Lua :: roblox tween 
Lua :: roblox loop all players 
Lua :: os.date lua 
Lua :: lua globals 
Lua :: luau table find 
Lua :: input in lua 
Lua :: how do you close the lua program 
Lua :: how to make a color changing brick in roblox studio 
Lua :: localplayer lua 
Lua :: roblox random number generator 
Lua :: what is lua used for 
Lua :: table.find lua 
Lua :: lua counting 
Lua :: check if child is touched roblox 
Lua :: random number genarator 
Lua :: how do i use the enums module lua assist 
Lua :: how do i use the errors module luaassist 
Lua :: how to enable https service roblox 
Matlab :: switch matlab 
Matlab :: log matlab 
Matlab :: how to set for with 2 increases in matlab 
Basic :: visual basic how to create a dynamic button 
Basic :: visual basic excel freeze first row 
Elixir :: elixir module 
Elixir :: elixir with 
Scala :: scala merge list of strings 
Actionscript :: rabbitmq login was refused using plain 
Excel :: excel and 
Perl :: perl format decimal 2 places not rounding 
ADD CONTENT
Topic
Content
Source link
Name
9+8 =