What exactly is CFrame:ToWorldSpace()?

Hello developers, so I was working with CFrames and a method in it called :ToWorldSpace(). I searched about it and found two explainations -

  1. If there are two Parts - A and B
local a = workspace.A
local b = workspace.B

a.CFrame = b.CFrame:ToWorldSpace(CFrame.new(0, 2, 0)

This would move A 2 studs relative to B’s Y Axis

  1. It converts the given CFrame relative to World Origin (0,0,0)

I’m really confused. Which one is true? Thanks

1 Like

The First option (1) would be true

1 Like

It’s a function that converts a certain CFrame to World Space

1 Like

But which of the following explainations is true? 1 or 2. As @boterflic5 answered, it’s 1. Even I think it’s 1.

1 Like

I do think 2 is true though as it’s similar to what I said…

3 Likes

Uhh… But it doesn’t work as the 2nd option says. I’m confused though.

I think both would be correct, as it is both moving it relative to itself, and returning the value of the world space (basically regular) CFrame value

1 Like

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