You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I want to add two CFrames -
What is the issue? Include screenshots / videos if possible!
It’s saying I’m trying to add a Vector3 and CFrame, but I printed both CFrames
-
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I can’t find anyone with this same issue.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local camera = workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
local character = game.Players.LocalPlayer.Character
while true do
local rotX, rotY, rotZ = camera.CFrame:ToEulerAnglesXYZ()
local previousCameraRotation = Vector3.new(rotX, rotY, rotZ)
local rotation = (character.Head.Orientation-previousCameraRotation).Magnitude
if (character.Head.Orientation-previousCameraRotation).X < 0 then
rotation *= 1
end
local cameraCFrame_pos = CFrame.new(character.Head.Position)
local cameraCFrame_rot = CFrame.fromOrientation(0, rotation, 0)
print(cameraCFrame_pos)
print(cameraCFrame_rot)
local cameraCFrame = cameraCFrame_pos + cameraCFrame_rot
print(cameraCFrame)
camera.CFrame = cameraCFrame
task.wait()
end
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.