Controller Camera "Rubberbands" camera & character back into default

The code I’m using came from a devforum post I saw on how to make polygun’s styled camera but just modified to fit controllers.

So right now, I’m currently trying to make the thumbstick on the controllers move the custom camera which is just an overhead 3rd person view locked with the character. The issue is that when using the controller’s thumbstick to move the camera, when moving the thumbstick back, it goes back into where it was before.

So I tried modifying the camera script and found the issue, it was the Cam’s cframe being set. However, not set

I might be completely missing something but I dont know what :thinking:

(Click the links)

Intended Behavior:

When setting cframe on camera (Rubberbanding):

Removing CFrame on Camera (Unintended, A mix of rubberbanding charcter and intended behavior yet unintended):

-- Controls Camera
local UserInput = game:GetService("UserInputService")
UserInput.InputChanged:Connect(function(Input,Processed)
    if Input.UserInputType == Enum.UserInputType.Gamepad1 then
        if Input.KeyCode == Enum.KeyCode.Thumbstick2 then
            FollowMouse = 0
            X = X + Input.Delta.X
            Y = math.clamp(Y-(Input.Delta.Y), -1, 1)
        end
    end
end)

-- Rotates Character
RunService:BindToRenderStep("CameraUpdate", Enum.RenderPriority.Camera.Value, function(Delta)
	UserInput.MouseBehavior = Enum.MouseBehavior.LockCenter
	local CameraRotation = CFrame.new(RootPart.Position) * CFrame.Angles(0, -X, 0) * CFrame.Angles(Y, 0, 0)
	
	Cam.CFrame = CameraRotation * CFrame.new(0, 4, 9) -- The issue
	
	if FollowMouse <= .3 then
		RootPart.CFrame = RootPart.CFrame:Lerp(CFrame.new(RootPart.CFrame.p) * CFrame.fromEulerAnglesXYZ(0, -X, 0), 0.55) -- Probable fix here?
	end
	
	FollowMouse = math.clamp(FollowMouse + Delta, 0, 1)
end)

Issue still persists, anyway I can fix it?

Just in case you forgot to do this, you should ensure that the CameraType is set to Scriptable to prevent default scripts from interfering.

Setting CameraType to Scriptable doesn’t help either as I believe this issue is being caused by the camera’s cframe being set however, I don’t know how I’d go without it since removing it causes the character to not attach to the camera (sounds odd but think some 3rd person game like polyguns or fortnite)

Anyway In the way I’d script it for it to work properly/alongside?