Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Difference between these CFrame methods?

I'm confused, what would be the difference between these two?

Part.CFrame = Part.CFrame * CFrame.new(0, 5, 0)

Part.CFrame = CFrame.new(0,5,0):toObjectSpace(Part.CFrame)-- Not sure if I positioned these values right, recently learned toObject and toWorld space, but to me these to seem to do the same thing, your just adding onto the previous value right?

1 answer

✓ Accepted answer

toObjectSpacelet's you know where something is in relation to something else. For instance, if you had too parts (Part1, Part2). It would allow you to figure out just where Part2 is relative to Part1, if the XYZ axii was "centered" at Part1, including rotation.

more on CFrame's member functions here, and here

1 comment

0

ok, I see thankyou

This discussion is preserved as it was. New answers, comments, and votes are closed.