Teach me how to make a camera zoom out button but i don't know how to do it. The only camera zoom out button thing i've tested is this script:
local maxZoom = game.Workspace.Camera local CameraZoomOut = script.Parent CameraZoomOut.MouseButton1Click:Connect(function() maxZoom.CFrame = CFrame.new(0,5,0) end)
I'm assuming you are attempting to do this with a localscript, if not then you should be. Firstly, try finding game.Workspace.CurrentCamera
instead of just Camera. Secondly, instead of altering the Camera's actual position, you can just use FieldOfView (which I believe is defaulted to 70). Just do something like...
local Camera = game.Workspace.CurrentCamera function ResetZoom() Camera.FieldOfView = 70 end CameraZoomOut.MouseButton1Click:Connect(function() Camera.FieldOfView = 90 end) --Just call the ResetZoom() function when you want to put the FieldOfView back to normal