I want to avoid player from controlling the camera, also avoid it to try to have the camera subject focused on the center of the screen, why?
In the game I’m working on, we want to have a camera that moves to a different CFrame when pressing the buttons of the menu at the side of the screen, so we need the camera only to move when players presses a button, and the CFrame of the camera is tweened, when this happens, after the tween completes it goes back to the player, and if I set a subject in front of where it ends tweening, the player can still move the camera.
When setting the camera type to Scriptable, it just gives a warn and goes as usual.
Using a LocalScript in StarterPlayerScripts you can use:
local Camera = game:GetService("Workspace"):WaitForChild("Camera")
if Camera ~= nil then
for Focus = 1,5 do
Camera.CameraType = enum.CameraType.Scriptable
-- Camera.CFrame = whatever
wait()
end
end
I got it!, ure right but I need to set the zoom distance to .5 on max and min, also set camera subject to something on the same CFrame i got tweened to