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?
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)
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.
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.