repeat wait() until game.Players.LocalPlayer and game.Players.LocalPlayer.Character
local camera = workspace.CurrentCamera
local RunService = game:GetService("RunService")
local mouse = game.Players.LocalPlayer:GetMouse()
RunService.RenderStepped:Connect(function()
camera.CFrame = workspace.CamPart.CFrame
workspace.CamPart.Orientation = Vector3.new(0,mouse.hit.y / 30,0)
end)
Hi there, I’m not all too familiar with doing camera mechanics like you’re describing but the issue could be something as simple as maybe you need to pass an x, y and z position on the Vector3.new line. Although, I’m not positive, little things like that can sometimes fly under the radar and be a little bit finicky.
repeat wait() until game.Players.LocalPlayer and game.Players.LocalPlayer.Character
local camera = workspace.CurrentCamera
local RunService = game:GetService("RunService")
local mouse = game.Players.LocalPlayer:GetMouse()
RunService.RenderStepped:Connect(function()
camera.CFrame = workspace.CamPart.CFrame
workspace.CamPart.Orientation = Vector3.new(0,mouse.X / 30,0)
end)
Try getting the mouse’s X position on the screen and setting it to the y-axis rather than the y position of the mouse’s hit