Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Trying to get camera to follow mouse in main menu? [SOLVED]

Asked by 5 years ago
Edited 5 years ago

I am trying to get the camera to follow the mouse and I thought it would be very simple but the code below doesnt work.

I thought using focus would just point the camera at the mouse.

function UpdateCamera()
    Camera.CFrame = CFrame.new(0, 5, 7.5)
    Camera.Focus = CFrame.new(Mouse.Hit.p)
end

game:GetService("RunService"):BindToRenderStep("Camera", Enum.RenderPriority.Camera.Value, UpdateCamera)

Does anyone have any ideas? Thank you for your time :)

Answer this question