RemoveCharacter (Method): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Camoy
No edit summary
>SoulStealer9875
Using in a script/localscript causes an error.
 
(4 intermediate revisions by 3 users not shown)
Line 2: Line 2:
<onlyinclude>{{Method
<onlyinclude>{{Method
|name = RemoveCharacter
|name = RemoveCharacter
|protected = yes
|description = Sets the parent of the Player's character to nil.
|description = Sets the parent of the Player's character to nil.
|object = Player
|object = Player
Line 9: Line 10:


{{Example|If using the [[Command Bar]] or a [[CoreScript]] then...<pre>
{{Example|If using the [[Command Bar]] or a [[CoreScript]] then...<pre>
game.Players.LocalPlayer:RemoveCharacter() -- removes the LocalPlayer's Character</pre>If using a [[Script]] or a [[LocalScript]]...<pre>game.Players.LocalPlayer:RemoveCharacter() --> s RemoveCharacter</pre>}}
game.Players.LocalPlayer:RemoveCharacter() -- removes the LocalPlayer's Character</pre>}}


[[Category:Methods]]
[[Category:Methods]]

Latest revision as of 13:18, 9 April 2012

Protected:This item is protected. Attempting to use it in a Script or LocalScript will cause an error.
RemoveCharacter( )
Returns nil
Description: Sets the parent of the Player's character to nil.
Member of: Player


Example
If using the Command Bar or a CoreScript then...
game.Players.LocalPlayer:RemoveCharacter() -- removes the LocalPlayer's Character