This is a script where it makes the camera follow the mouse, similar to FNaF’s camera
I’m going to make myself clear, I didn’t make this script.
I just got it off this forum, and messed with it to get the result I wanted
The issue here is that it’s not covering the whole space
local player = game:GetService("Players").LocalPlayer
local mouse = player:GetMouse()
local camera = workspace.CurrentCamera
local camPart = workspace.CamPart
local rotateAmount = 30
local fov = 70
local function enable()
camera.CameraType = Enum.CameraType.Scriptable
camera.FieldOfView = fov
camera.CFrame = camPart.CFrame
game:GetService("RunService"):BindToRenderStep("CameraLookAtMouse", Enum.RenderPriority.Camera.Value + 1, function()
camera.CFrame = camPart.CFrame * CFrame.Angles(
0,
math.rad((mouse.X - mouse.ViewSizeX) / mouse.ViewSizeX * -rotateAmount),
0
)
end)
end
local function disable()
game:GetService("RunService"):UnbindFromRenderStep("CameraLookAtMouse")
camera.CameraType = Enum.CameraType.Custom
end
enable()
Can you at least describe or provide an output? I was only asking for the code just to make sure you have set the fix correctly, now I want to know how did the code break. Please give more effort to responding instead of “it won’t work” replies.