Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I manipulate the camera?

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

✓ Accepted answer

.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.

1 comment

0

Thanks!

This discussion is preserved as it was. New answers, comments, and votes are closed.