Help making a shift-lock

You can write your topic however you want, but you need to answer these questions:
1. What do you want to achieve? Keep it simple and clear!

I want to make a shift-lock camera system similar to the one in this video: Click Me! from the timestamp 1:27.

2. What is the issue? Include screenshots / videos if possible!

See Above

3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

Tried to see the code in the video, have different attempts with varied results, none of them are what I’m looking for :pensive:

I don’t want a big script i just want a method and maybe a small example, thanks in advance if anyone even SEES this post :smiley:

I don’t know the math behind it (I’m dumb) but you would just constantly rotate the player and character based on the rotation of the camera.

Some post like this should show ya

So, I tried both this solution and I modified it a bit and neither worked.
Look at the video i sent, then try this script:

local player       = game:GetService("Players").LocalPlayer
local character    = player.Character or player.CharacterAdded:Wait()
local rootPart     = character:WaitForChild("HumanoidRootPart")
local camera       = game:GetService("Workspace").CurrentCamera
local runService   = game:GetService("RunService")
local humanoid     = character:WaitForChild("Humanoid")

--// Shift Lock Function
local function shiftLock(toggle)

	local function lock()
		humanoid.CameraOffset = Vector3.new(1,1,0)

	end

	if toggle then

		runService:BindToRenderStep("ShiftLock", 200, lock)

	else

		runService:UnbindFromRenderStep("ShiftLock")

	end; humanoid.AutoRotate = true

end

shiftLock(true) -- enabling shift lock

Then, you should see what I mean. I’m sorry, i don’t have a recording software or better way to describe it :frowning:

1 Like

I went to 1:27 but can’t tell the difference between that and the default camera movement

Oh, well its the fact that he uses shiftlock, and it works as normal, except autorotate is on, but somehow different. Try plugging in the script in post 2 to a studio game and compare it to the video, in my script not only does the player turn, so does the camera offset. However for him the player turns but the camera offset doesn’t