CameraSubject (Property): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Legend26
No edit summary
>Legend26
No edit summary
(No difference)

Revision as of 20:46, 6 April 2012

Local: This item should be used with a LocalScript in order to work as expected in online mode.
CameraSubject
Property Instance
Description A Model, Part, or Humanoid for the camera to look at. Setting this property will override the Focus property.
Member of Camera


Example
In a LocalScript inside the player's character or player's PlayerGui we can do
game.Workspace.CurrentCamera.CameraSubject = game.Workspace.Part

Makes the player's camera point towards 'Part'.

game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid

Reverts the camera to pointing back towards the character.


See Also