How to offset mouse lock position?

Basically I have this script that locks the mouse to the middle, but I want to offset it to the right but I dont seem to know how

this is the code
uis.MouseBehavior = Enum.MouseBehavior.LockCenter

How would I offset this? thanks.

dont think you can. but you can do what shift lock does and offset the camera

1 Like

Sorry, you got that from chatGPT? cause that does makes no sense at all…
MouseBehavior.LockCenter + Vector2.new(offset, 0) ???..

Remember that chatGPT is way far from a scripting tool, it could help in easy tasks, but it cant understand this kind of requests/prompts, and usually gives nosense approaches. I suggest never use it for stuff like this…

This LocalScript will offset your camera:

game:GetService("RunService").RenderStepped:Connect(function()
	local studsright = 2
	workspace.CurrentCamera.CFrame = workspace.CurrentCamera.CFrame + ((workspace.CurrentCamera.CFrame * CFrame.Angles(0, (3.14159265358979/180)*90, 0)).LookVector * -studsright)
end)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.