I am so close to finishing this system, but i was wondering, how would I add an offset to this so that it does not tilt around the root motor6d? I tried using the neck but that is not working
https://gyazo.com/f0c3dc65fe1296af552d2f8df983f314
RunService.RenderStepped:Connect(function(deltaTime)
if isGliding then
local isMouseMoving = lastmouseDelta > idleThreshold
if not isMouseMoving then
lastmouseDelta = math.max(0, lastmouseDelta - deltaTime * 5)
end
if isMouseMoving then
local Delta = UserInputService:GetMouseDelta()
local Value = math.sign(Delta.X)
lastmouseDelta = math.abs(Delta.X)
if Value > 0 then
Tilt = math.max(-MaxTilt, Tilt - 1)
else
Tilt = math.min(MaxTilt, Tilt + 1)
end
else
TargetTilt = 0
end
local lerpFactor = 0.05
if isMouseMoving then
lerpFactor = 0.01
end
Tilt = Tilt + (TargetTilt - Tilt) * lerpFactor
Character.LowerTorso.Root.C0 = CFrame.Angles(0, 0, math.rad(Tilt))
end
end)
mouse.Move:Connect(function()
lastmouseDelta = math.abs(UserInputService:GetMouseDelta().X)
end)