CameraMode (Property): Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>JulienDethurens No edit summary |
>Flurite No edit summary |
||
Line 10: | Line 10: | ||
{{clear floats}} | {{clear floats}} | ||
==Example== | ==Example== | ||
This code, put in a {{type|instance=LocalScript}}, would lock the camera of the player it is running for to first person. | This code, put in a {{type|instance=LocalScript}}, would lock the camera of the player it is running for to [[first person|First Person]]. | ||
<code lua> | <code lua> | ||
game:GetService('Players').LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson | game:GetService('Players').LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson |
Revision as of 00:28, 6 April 2012
Local: This item should be used with a LocalScript in order to work as expected in online mode.
CameraMode | |
Type | CameraMode |
Description | Changes mode of camera - either first/third person or first person only |
Member of | Player |
Example
This code, put in a LocalScript, would lock the camera of the player it is running for to First Person.
game:GetService('Players').LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson
Notes
If you use this property in a Script, it will set the property, but it will not work as expected. The property must be set from a LocalScript.