I really don’t know why this is happening, I quite clearly have all 3 arguments, but the error tells me there isn’t any value when in this case, it’s 1. Please help!
and before you say, dont be complaining about the parents
Are you saying the second argument needs to be an angle? If so, how can I automatically find the angle of the part for the camera to look at it? I’m assuming I’d just find the opposite if the number says 180 would become -180 (or 0)
I believe your issue isn’t the interpolate function, but rather CFrame.Angles(script.Parent.Parent.Parent.Adornee.Orientation)
CFrame.Angles doesn’t have a constructor that accepts a Vector3. You can use CFrame.fromOrientation, however you’ll have to pass in the X, Y and Z angles as seperate arguments.
Might also be worth noting that CFrame.Angles == CFrame.fromOrientation == CFrame.fromEulerAnglesXYZ. Either function would work: I prefer Angles personally because of the naming convention. Just gotta be mindful that these functions work in radians.
I believe that you could break the CFrame down into its rotational components so that you avoid using the Orientation Vector3 and that should work well enough for forming back a rotated CFrame.
local RX, RY, RZ = SomeCFrame:ToOrientation()
local RotatedCFrame = CFrame.Angles(RX, RY, RZ)
-- Later
Camera:Interpolate(PositionCFrame * RotatedCFrame, SecondCFrame, Alpha)
Yes, although I’m pretty sure OP’s “Adornee” property is just a BasePart, so he could probably just use the CFrame + 5 depth, which I didn’t notice before.
Also, I’m not 100% sure if this is correct however according to developer wiki, CFrame.fromOrientation and ToOrientation is based on YXZ, while CFrame.Angles is based on XYZ.