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

Camera Angel Not Working?

Asked by 10 years ago
cam = game.Workspace.Camera -- Get camera from workspace
cam.CameraSubject = game.Workspace.a -- Set the camera to a object
cam.FieldOfView = 25 -- Set FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 26 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 27 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 28 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 29 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 30 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 31 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 32 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 33 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 34 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 35 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 36 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 37 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 38 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 39 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 40 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 41 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 42 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 43 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 44 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 45 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 46 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 47 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 48 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 49 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 50 -- Changes FOV(FieldOfView)

Why does this only work in studio? please help

2 answers

Log in to vote
0
Answered by 10 years ago
cam = game.Workspace.CurrentCamera-- Get camera from workspace
cam.CameraSubject = game.Workspace.a -- Set the camera to a object
cam.FieldOfView = 25 -- Set FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 26 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 27 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 28 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 29 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 30 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 31 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 32 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 33 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 34 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 35 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 36 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 37 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 38 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 39 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 40 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 41 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 42 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 43 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 44 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 45 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 46 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 47 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 48 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 49 -- Changes FOV(FieldOfView)
wait(.1) --wait .1 seconds
cam.FieldOfView = 50 -- Changes FOV(FieldOfView)

NOTE: Put this in local script because Current Camera can only be called in local scripts.

Ad
Log in to vote
-1
Answered by
TofuBytes 500 Moderation Voter
10 years ago

You need to use:

cam = game.Workspace.CurrentCamera

Answer this question