CFrame:ToWorldSpace() and CFrame:ToObjectSpace(), What is that?

I already have some post about “Relative to Object/Part” or still “Relative to the World”, but I don’t understand it. The only thing I know is that they have something to do with the functions CFrame:ToWorldSpace() and CFrame:ToObjectSpace(). I already read about CFrame in the article, but didn’t understand it. Can anyone help me?


Think of it like this:

Object Space: The xyz axis is rotated like the part shown:

World Space: The xyz axis is to the worlds axis:
image (
Sorry for my bad image editing skills)


This method converts a cframe in object space to a cframe in world space . In other words it takes cf (which is relative to CFrame ) and returns a result that is relative to the origin. For example, if I have a cframe called cf1 which is defined to be , 10 , 0) and I have another cframe relative to cf1 called cf2 which is , 0 , 0) , cf1:toWorldSpace(cf2) will return a cframe in world space that is relative to the origin/identity cframe .


This method does the exact opposite. Given a CFrame (let’s call it cf1 ), and an input CFrame (call it c2 ), it will return a result representing the cframe cf2 is in relative to cf1 . For example, if an input CFrame defined , 1 , 3) is given, , 1 1):toObjectSpace(cf) will return , 0 , 2) because that is the CFrame the input is in relative to , 1 , 1)


A question, why do you have to use two CF for these two functions?


You don’t. you literally type CFrame:ToWorld/ObjSpace not,y,z):ToWorld/ObjSpace.

Also sorry for the bump

1 Like