Yes actually. I’m making a ragdoll system and whenever a player is being ragdolled, the camera starts spazzing. I’m trying to make a new camera subject that won’t be affect by the ragdoll to fix the spazzing issue.
--put this in a localscript
local plr = game:GetService("Players").LocalPlayer;
local char = plr.Character or plr.CharacterAdded:Wait();
local camera = workspace.CurrentCamera;
camera.CameraSubject = char.Part; --makes the camerasubject the part in the character
game:GetService("RunService").RenderStepped:Connect(function()
if game:GetService("UserInputService").MouseBehavior == Enum.MouseBehavior.LockCenter then
local x, y, z = camera.CFrame:ToOrientation() --gets xyz of the camera orientation
char.Part.CFrame = CFrame.new(char.Part.CFrame.p) * CFrame.Angles(0, y, 0) --sets y orientation of part to camera's y orientation
end
end)