Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR LUA

roblox get player from character

local character = game.Workspace.Player
local player = game.Players:GetPlayerFromCharacter(character)

--This function above will return the object value of the player
--if that character dosen't have a player, it will return nil instead
 
if player then
    print("Player is " .. player.Name)
else
    print("Player doesn't exist!")
end
Source by developer.roblox.com #
 
PREVIOUS NEXT
Tagged: #roblox #player #character
ADD COMMENT
Topic
Name
4+9 =