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

Why isn't this smoothly zooming in?

Asked by 9 years ago

I have this script, where when you equip it you smoothly zoom in until you are in first person but it doesn't smoothly zoom in, it just locked immediately when I equip the tool.

here is the script:

script.Parent.Equipped:connect(function()
    local gui = game.Players.LocalPlayer.PlayerGui.ScreenGui.TextButton
    gui.pressed.Disabled = true
    gui.clicked.Disabled = true
    local c = game.Players.LocalPlayer.CameraMinZoomDistance
    for i = c,0,-1 do
        game:GetService("RunService").RenderStepped:wait()
        game.Players.LocalPlayer.CameraMinZoomDistance = i
        print (game.Players.LocalPlayer.CameraMinZoomDistance)
    end
    game.Players.LocalPlayer.CameraMode = "LockFirstPerson"
end)
0
Why do you have c in the for loop statement? RedCombee 585 — 9y

Answer this question