Answered by
6 years ago Edited 6 years ago
Necessary Items:
A. FilteringEnabled set to true
This is to make sure that the game doesn't replicate all changes on the client to the server, making each player's changes unique (so if you died and the camera was reset it would not reset for all players)
B. Using a Local Script
To change a player's camera you must use a LocalScript since the camera is unique to each player, and changes to the server camera will not replicate (as it is not the same instance)
C. Using CurrentCamera
The workspace has an instance called "CurrentCamera" which on the client serves as the directional framing of the player's movement. The Camera cannot be directly edited from the server since the current camera is only local.
EXAMPLE
Change
1 | game:GetService( "Workspace" ).Camera |
to
1 | game:GetService( "Workspace" ).CurrentCamera |
For more on the Camera, see the below link:
https://developer.roblox.com/api-reference/class/Camera