This is my script
if (hit.HitCount.Value >= 5) then local graveyard = CFrame.new(99, -759, -2763) -- The destination it needs to go local oldPos = CFrame.new(hit.Position) -- The part's original position hit.CFrame = graveyard wait(5) hit.HitCount.Value = 0 hit.CFrame = oldPos -- Returns to it's old position end
I want it to go to the destination (graveyard) then return after 5 seconds keeping both it's old position and rotation. But the problem is that CFraming resets the rotation.
I have tried many things that I thought of as I went but none worked. Any help is appreciated, thank you.
You can use Position instead of CFrame, CFrame is Position and Rotation, Position is used with Vector3 like, Object.Position = Vector3.new(X,Y,Z) with XYZ as integers