Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I manipulate the camera?

Asked by 10 years ago
function player()
repeat wait() until game.Workspace.CurrentCamera 
local cam = game.Workspace.CurrentCamera
cam.CameraSubject = game.Workspace.Part 
cam.CameraType = ("Attach")
cam.FieldOfView = 50
end

game.Players.PlayerAdded:connect(player)

It should follow a brick that I've put into Workspace. It works in studio, but not when I actually play. I'm also new to controlling the games' camera and this site Help?

1 answer

Log in to vote
3
Answered by
BlueTaslem 18071 Moderation Voter Administrator Community Moderator Super Administrator
10 years ago

.CurrentCamera will only work property in servers from a LocalScript.

That means you wouldn't be using the PlayerAdded event, but simply a LocalScript inside of the StarterGui that runs the code to modify the CurrentCamera.

0
Thanks! Senor_Chung 210 — 10y
Ad

Answer this question