How do i rotate with CFrame in world space instead of local space?

Title explains it all. How do i get this to rotate world space instead of local space?

RotateCFrame = Object.CFrame * CFrame.Angles(RotateIncrement, 0, 0)
2 Likes

You may want to read this article!

It outlines what you need by explaining methods such as: CFrame:ToWorldSpace()
CFrame:ToObjectSpace()

In an example code segment, you may want to do something like this:

local partToRotate = -- path to part
local rotateIncrement = math.rad(1)

game:GetService("RunService").RenderStepped:Connect(function()
    local rotateCFrame = CFrame.Angles(rotateIncrement, 0, 0)
    partToRotate.CFrame = partToRotate.CFrame:ToWorldSpace(rotateCFrame)
end)
5 Likes

Ahh, i see. Thank you!

(30 chars)

It doesn’t rotate in world space. It still rotates in local space (The object’s axis)

1 Like

use
Rotation = Part.CFrame.LookVector * RotSpeed
or
Rotation = Part.CFrame:VectorToWorldSpace(Vector3.new(0, 0, -1)) * RotSpeed

2 Likes

Sorry for bumping because this is the top of google search. (And the answer rotates in local space based on the partToRotate.CFrame axis)

4 Likes