I had a problem with CFrame in scripting. I needed an object to be positioned and rotated in a CFrame just like the block below (there are more, but I only focus on one in the situation).
It all works fine just by setting the objects CFrame = block.CFrame, but I need the thing to be placed 0.2 studs above the block.
I’ve come up with this:
prop.Position = Vector3.new(mouse.Target:FindFirstChild(PortLocation).Position.X, mouse.Target:FindFirstChild(PortLocation).Position.Y + 0.2, mouse.Target:FindFirstChild(PortLocation).Position.Z)
prop.Orientation = mouse.Target:FindFirstChild(PortLocation).Orientation
But it’s long and looks horrible, so I just want to know if there’s a better way of doing that with CFrames instead of positions and orientations.