Tweening Camera Offset Problem


I’m facing an issue with the camera that I am unable to solve. I’ve searched high and low for results, but to no avail. Here is what’s happening:

  • This video displays the camera glitch every time I press ‘Shift+C’ while moving.

Here Is My Script:

function ChangeCameraOffset(Offset)
	if not char then char = plr.Character or plr.CharacterAdded:Wait() end
	local Humanoid = char:WaitForChild("Humanoid")

	local Tween = TweenService:Create(Humanoid,, {CameraOffset = Offset})

uis.InputBegan:Connect(function(input, gameProcessedEvent)
	if input.KeyCode == Enum.KeyCode.C and uis:IsKeyDown(Enum.KeyCode.LeftShift) and DB == false and tick()-RollStartTime > .75 and hum.MoveDirection.Magnitude > 0 then
		ChangeCameraOffset(, -2, 0))
		hum.JumpPower = 0
		Sliding = true
		RollStartTime = tick()
		local dirVec = workspace.CurrentCamera.CFrame.LookVector
		RollDirection = (dirVec*,0,1)).unit
		DB = true
		Sliding = false
		ChangeCameraOffset(, 0.475, 0))
		hum.JumpPower = 37
		DB = false


1 Like

Hey @xxxrazorfire12!

I’m not really sure what your issue is. I can see that your camera is behaving weirdly but considering you haven’t given me any context on what it’s supposed to look like I can’t really discern your problem.

You can’t just say “Here’s my issue” and post a video and expect anyone to understand.

Whats more is that script you posted isn’t complete and you haven’t posted the error message.
You’re giving me very very little to work with.

It’s supposed to tween the humanoid’s camera offset, hopefully achieving a crawling camera. But it doesn’t as you can see in the video.

Thank you for your time and effort, I’ve found a work around.