Player feels “glitchy” please help

Here’s the recording:


script:

local function UpdateCam(enemy)

	local hrpPos, dummyPos = char.HumanoidRootPart.Position, enemy.Torso.Position
	local CFam = CFrame.new(hrpPos, Vector3.new(dummyPos.X, hrpPos.Y, dummyPos.Z))
	
	local CamCFam = CFrame.new(hrpPos+Vector3.new(0,2,0), Vector3.new(dummyPos.X, hrpPos.Y, dummyPos.Z))*CFrame.new(3, 1, 8)

	workspace.CurrentCamera.CFrame = CamCFam
	char.HumanoidRootPart.CFrame = CFrame.lookAt(hrpPos, Vector3.new(dummyPos.X, char.HumanoidRootPart.Position.Y, dummyPos.Z))

end
1 Like

the code is not the problem, this code is fine regarding your bug. it is probably the enemy var you are passing to the function

Are you sure? It looks fine on the local side, but not from the player’s perspective

What I mean by that is it looks “laggy”

Bumping this. Issue hasn’t been solved yet.

Bumping again…Please help. I would really appreciate it

by bumping you mena the camera moves in a instant?

If that is the case then you should use Tween Service to make it smoother

I tried. For some reason it’s still the same.