When the player holds down right click, I want the camera to face their mouse.
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local MouseFace = false
mouse.Button2Down:Connect(function()
MouseFace = true
while MouseFace == true do
camera.CFrame = () -- Face camera at player's mouse here
wait()
end
end)
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local MouseFace = false
mouse.Button2Down:Connect(function()
MouseFace = true
while MouseFace == true do
camera.CFrame = CFrame.lookAt(camera.CFrame.Position, mouse.Hit and mouse.Hit.Position)
wait()
end
end)