local Camera = game.Workspace.CurrentCamera
game.Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(msg)
if string.sub(msg,1,10) == Prefix.."spectate " then
Camera.CameraSubject = game.Players:FindFirstChild(string.sub(msg,11)).Character.Humanoid
end
end)
end)
COMMUNITY QUESTION
How to fix this? It wont change cameraSubject
2 answers
try
Camera.CameraSubject = Enum.CameraSubject. --type what you want the camera subject to be after the .
Cameras can be changed by a local script, NOT a server script. So, if you want to change the CameraSubject, you have to do it in a local script.
Also, you can change the CameraSubject to a player's character model instead of a player's humanoid. Like this:
local cam = workspace.CurrentCamera
cam.CameraSubject = game.Players.LocalPlayer.Character
This discussion is preserved as it was. New answers, comments, and votes are closed.

7 comments
if this does not work then on line 1 put local Camera = workspace.CurrentCamera
might be same thing but worth a try roblox studio is like the buggiest thing in the world
When i try to put enum.camerasubject it doesnt appear
what doesn't appear? Please be more specific
CameraSubject Is not a enum
dam your right... But i just tried out your script and it says in the output "index nil with Character"
never mind i fixed that sorry i dont know