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

Why does the part go in the ground while using CFrame?

Hello I am having a problem where I am trying to rotate a part using CFrame and it moves itself to 0,0,0 but it rotates. and it does not keep its original position! here is the code:

local part = script.Parent

local newCFrame = CFrame.Angles(0,math.rad(45),0)

part.CFrame = part.CFrame * CFrame.Angles(0,math.rad(45),0)

1 answer

✓ Accepted answer

Try...

part.CFrame = CFrame.Angles(0, math.rad(45), 0) + part.CFrame.Position

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