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

My camera script doesn't work like I want it to?

Like, I want it to show their camera at this point, but instead it makes them stay zoomed out the whole time. Help?

cam = workspace.CurrentCamera
cam.CameraType = "Scriptable"
focus = Vector3.new(0, 15.8, 0)
zoom = 70
zoomin = true

for i = 1, 200, 1 do
    if zoom == 20 then
        zoomin = false
    end
    if zoomin then
        zoom = zoom - 1 
    else
        zoom = zoom + 1
    end
    cam.FieldOfView = zoom
    pos = focus + Vector3.new(-50 + i/2, 20, -50)
    cam.CoordinateFrame = CFrame.new(pos, focus)
    wait()
end

wait(1)
cam.CameraType = "Custom"

I'm trying to make the player's camera continue to spin around a certain point.

1 comment

1

Lol you misspelled FieldOfView. Remember, i before e except after c (plus hundreds of exceptions lol).

1 answer

✓ Accepted answer

On line 16, you misspelt FieldOfView as FeildOfView.

Change:

cam.FeildOfView = zoom

To:

cam.FieldOfView = zoom

6 comments

0

Still doesn't solve my problem.

0

Well, that should've solved your zooming issue. I don't see how this script would make the camera spin though. Try looking at this: http://wiki.roblox.com/index.php?title=Camera_manipulation#Circling_the_part

0

Your link helped very much, but it goes behind the part backwards. Why is that? It also circles around very slowly.

0

Fixed how slow it goes.

0

Oh, nevermind. I fixed all of it. I'll thumbs up. But, there is one more thing. How do I change how much it's zoomed in?

1

Again, change the FieldOfView property until you find a zoom you like. Or you can move the camera closer to the object.

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