Custom shift lock

Here is my script for the shift lock

local cam = game.Workspace.CurrentCamera

local RunService = game:GetService("RunService")

local char = script.Parent

local hum = char:FindFirstChild("Humanoid")

RunService.RenderStepped:Connect(function ()
	local x,y,z = cam.CFrame:ToOrientation()
	char.HumanoidRootPart.CFrame = CFrame.Angles(0,y,0)
end)

right now the players position stays at 0,0,0 how would i add the Humanoid Root Parts position into this CFrame without it affecting the angles?

1 Like

Try ```humanoidRootPart.Cframe= CFrame.new(your_desired_position) * CFrame.Angles(0,y0)

2 Likes

yep i was looking into it and got it figured, thats what i was needing.

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