Camera rotation help

Hi, working on a space game, and in space your character rotates freely, so I want the camera to follow the orientation of the character, while maybe still retaining it’s limits. If the character spins around on the Z axis, the camera will, also. How would I do it?

Inside of your camera module, you can set the Camera CFrame like:

local charCFrame = Character:GetPivot()
local offset = CFrame.Angles(math.rad(charCFrame.Rotation.X), math.rad(charCFrame.Rotation.Y), math.rad(charCFrame.Rotation.Z))
local camDist = 18
Camera.CFrame = (charCFrame * offset):ToWorldSpace(CFrame.new(0,0,-camDist))

Well, I don’t have a camera module, I was talking about the roblox one, is this the one you mean?