Ad
Log in to vote
0

Setting the camera to another player?

Asked by 7 years ago

How would I set the players camera to another players camera? would it be game.Players.playername.Camera? or

1 answer

Log in to vote
0
Answered by 7 years ago

You would set the CurrentCamera's CameraSubject to another player's humanoid.

--local script

local Players = game.Players:GetChildren()
local PlayerSubject = Players[math.random(1, #Players)] --Setting it to a random player

local Camera = game.Workspace.CurrentCamera --Note that the CurrentCamera can only be accessed from a local script.

Camera.CameraSubject = PlayerSubject.Character.Humanoid

Something like that, I think. Except you would put the random player in a loop, to make it a different player. Just look at the Wiki, it explains more xD My code isn't quite right.

Ad

Answer this question