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

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

Asked by
Relatch 550 Moderation Voter
9 years ago

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
Lol you misspelled FieldOfView. Remember, i before e except after c (plus hundreds of exceptions lol). bobafett3544 198 — 9y

1 answer

Log in to vote
2
Answered by 9 years ago

On line 16, you misspelt FieldOfView as FeildOfView.

Change:

cam.FeildOfView = zoom

To:

cam.FieldOfView = zoom
0
Still doesn't solve my problem. Relatch 550 — 9y
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 Spongocardo 1991 — 9y
0
Your link helped very much, but it goes behind the part backwards. Why is that? It also circles around very slowly. Relatch 550 — 9y
0
Fixed how slow it goes. Relatch 550 — 9y
View all comments (2 more)
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? Relatch 550 — 9y
1
Again, change the FieldOfView property until you find a zoom you like. Or you can move the camera closer to the object. bobafett3544 198 — 9y
Ad

Answer this question