What's the difference between these two CFrames?

Is:

CenterPartWithArrows.CFrame = CFrame.identity
CenterPartWithArrows.Position = (part.ExtentsCFrame * part:GetAttribute("offset")).Position

the same thing as:

CenterPartWithArrows.CFrame = CFrame.identity * CFrame.new((part.ExtentsCFrame * part:GetAttribute("offset")).Position)

Which one is more performant?
Thanks!

CenterPartWithArrows.CFrame = CFrame.identity
CenterPartWithArrows.Position = (part.ExtentsCFrame * part:GetAttribute(“offset”)).Position
This sets the CFrame to the origin (0, 0, 0), then updates the Position separately.

CenterPartWithArrows.CFrame = CFrame.identity * CFrame.new((part.ExtentsCFrame * part:GetAttribute(“offset”)).Position)
But this one sets the CFrame and Position in one function.

So the 2nd one would preform better because it’s in one function

Do you think CFrame.identity is necessary?

You dont really need it but it depends on what your trying to acheive

you could just do
CenterPartWithArrows.CFrame = CFrame.new((part.ExtentsCFrame * part:GetAttribute(“offset”)).Position)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.