CFrame deleting parts -

Hi! So I’ve been messing around and learning about CFrame, I wanted to make it so the part would spin, I used this article to learn some more about CFrame.Angles() , but when I tried it out the part disappeared. I Checked the Explorer and it had been deleted?
I tried it again using the code given in the section about CFrame.Angles(), and the same thing happened.

Anyone know why?

Are you sure the part in question is anchored?

I have tried both having it anchored and un-anchored.

1 Like

Here is the article I was using.

Hello, I used CFrame.Angles() and it works perfectly for me, I’m not sure why it doesn’t work for you.

Here is the script I used:

while wait() do
	script.Parent.CFrame = script.Parent.CFrame * CFrame.Angles(0, 0.05, 0)
end

Mind sending the code used for CFrame.Angles()?

This is the code the article used for CFrame.Angles()

local redBlock = game.Workspace.RedBlock 
 
-- Create new rotated CFrame
local newCFrame = CFrame.Angles(0, math.rad(45), 0)
 
-- Overwrite red block's current CFrame with new CFrame
redBlock.CFrame = newCFrame

It doesn’t work because you didn’t combine the current redBlock CFrame with the newCFrame. So to fix it, you just have to put:

redBlock.CFrame = redBlock.CFrame * newCFrame
1 Like

Alright I’ll try it when I get home,