Argument 3 Missing Or Nil

Hello,
I have a script here for a main menu camera that is supposed to make the camera sort of follow your mouse. However, it is not working, and on line 12 it says "Argument 3 Missing Or Nil"
Any help would be greatly appreciated. I can’t really find much documentation on this with cframe.

local RunService = game:GetService("RunService")
local Mouse = game.Players.LocalPlayer:GetMouse()
local Camera = game.Workspace.Camera

local MenuCamera = game.Workspace.Camera1
local Move = 150

function UpdateCamera()
	local Center = MenuCamera.CFrame
	local MoveVector = Vector3.new((Mouse.X - Center.X)/Move, (Mouse.Y - Center.Y)/Move,0)
	script.Parent.PlayButton.Modal = true
	Camera.CFrame = MenuCamera.CFrame*CFrame.Angles(math.rad(-(Mouse.Y - Center.Y)/Move)- math.rad(-(Mouse.X - Center.X)/Move),0)
end

RunService.RenderStepped:Connect(UpdateCamera)

1 Like
Camera.CFrame = MenuCamera.CFrame*CFrame.Angles(math.rad(-(Mouse.Y - Center.Y)/Move), math.rad(-(Mouse.X - Center.X)/Move),0)

Just need to replace the subtraction sign with a comma to separate the arguments correctly.

Thanks, it works great now! I appreciate it.