PlayerFromCharacter (Method): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Blocco
Added note and changed some of the code.
>MrNicNac
This is now official deprecated and will cause the output to spit at you.
 
(2 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}}
 
<span style="font-size:16px; font-weight:bold;">Please Note: When using this method in places, it's name must be in camelCase.</span>
 
{{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