PlayerFromCharacter (Method): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>MrNicNac
Added an example of the method.
>MrNicNac
This is now official deprecated and will cause the output to spit at you.
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<onlyinclude>{{Method
#REDIRECT [[GetPlayerFromCharacter (Method)]]
|name = PlayerFromCharacter
|arguments = [[Instance]] ''character''
|returns = [[Player]] object which is controlling the character.
|description = Gives you the player from that player's character.
|object = Players
}}</onlyinclude>
 
{{clear floats}}
 
{{Example|You give this function a model, and it will return the player if the model is the character of that player, or nil.
<pre>
local Player = Game.Players:PlayerFromCharacter( Workspace.Player )
print(Player)
>Player
</pre>
}}
 
[[Category:Methods]]

Latest revision as of 02:41, 30 June 2011