I want to like make the mouse look to the mouse position from all sides. x,y and the rotation
This is what i have
https://gyazo.com/6fabbb729b0f0b35f4aab28bdb68707e
If anyone knows how to move it from all sides to the mouse position, please reply this topic.
local Mouse = game.Players.LocalPlayer:GetMouse()
local Camera = game.Workspace.CurrentCamera
local DefaultCFrame = game.Workspace.Part.CFrame
local Scale = 100
function Update()
local Center = Vector2.new(Camera.ViewportSize.y/-10, Camera.ViewportSize.x/-10)
local MoveVector = Vector3.new((Mouse.X-Center.y)/Scale, (Mouse.Y-Center.x)/Scale, -3)
Camera.CFrame = DefaultCFrame * CFrame.new(DefaultCFrame.p + MoveVector )
end
game:GetService("RunService").RenderStepped:Connect(Update)