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 make the "CurrentCamera" UnZoomable?

soo...I made this script.

local Position = game.Workspace.CameraLocation

game.Workspace.CurrentCamera.CameraSubject = Position
game.Workspace.CurrentCamera.CameraType = "Attach"

the only problem was , Player can Zoom In and Zoom out.

How Do I Make The Camera Can't Be Zoom In Or Zoom Out?

3 answers

✓ Accepted answer
local Position = game.Workspace.CameraLocation
local Datpart = -- Put how ever you are going to get the part the player is controlling
local Zoffset= -- how far camera is from part
local Yoffset= -- how high camera is from part

game.Workspace.CurrentCamera.CameraSubject = Datpart
game.Workspace.CurrentCamera.CameraType = "Scriptable"
game.Workspace.CurrentCamera.CoordinateFrame = Datpart.CFrame + CFrame.new(0,Yoffset,Zoffset)

So, I scripted a custom camera behavior, because default roblox ones allow zoom. This script takes the parts Cframe, then zooms out and up from variables you decide ( the variables are measured in studs)

2 comments

0

OMG,Thank you so much!

0

Your welcome

For this, you should use the CameraMaxZoomDistance and CameraMinZoomDistance properties of Player.

It's easy, just set them to the value. It should be between 1 and 400.

You could use player.CameraMaxZoomDistance = player.CameraMinZoomDistance for the smallest zoom, or, 15, for the default zoom.

2 comments

0

This Would Work If I Use My "Player" as a Subject.But Now, the Subject is a PART. This Won't Work.

0

You should elaborate your questions more then, because I had no clue what you meant. Plus, this would work by using LocalPlayer either ways.

In the game explorer there is a starter player tab or something like that. Two of its properties are max zoom and min zoom. Set those to 0. This is only if you want it like that permanently rather than changing it from something you already have.

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