Help with pivot

Hi,

so I’m currently scripting a part using CFrame. I added pivot to the part so it doesn’t rotate on the middle. So when I ran the game it still rotated in the middle. Im not sure how to make it rotate where the pivot is.

script:

while true do
	script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(-1,0,0)
	wait(4)
end

i hope someone can help.

From,
File

pivot?

this thing?
image

if you use that for scripting, it wouldn’t work, if you want to achieve what you’re trying to do you might require some math, maybe

Sounds like you’re wanting PivotTo.

I think it’d look like this:

while true do
    script.Parent:PivotTo(script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(-1,0,0))
    wait(4)
end

sadly tis didn’t work. I think i may just do an outside of thing box thing. i’m just going to duplicate the object and flip it 180 degrees and put it next to it ten make its transparency, then group it ten to finis it off, animate it.