New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
Still have questions? Join our Discord server and get real time help.
Log in to vote

How do I rotate a part on an axis?

Asked by
AltNature 169
5 months ago
Edited 5 months ago

I have created an oven, and I wish to use Magnitude with Run-Service and User Input Service to pop up a GUI that reads, " Press "E" to open oven" ; however, I run into the issue that the oven rotates in place, rather than on the axis it is "attached" (not actually attached to the oven) on. I am now concerned on how I would rotate the part in a way that doesn't look completely wrong. Big thanks for taking your time to read my question, if you could answer.. thanks! UPDATE - I FIGURED OUT HOW TO ROTATE ON AN AXIS; HOWEVER I RAN INTO A PROBLEM.. AS FOLLOWS

I have this script, I was able to figure some of it out , but for some reason the parts clump together as if on a axis I didnt want them on / something like that , please help

-- Have a remote event fire from starter player scripts to activate this script, for now I am testing if I like how the oven 
-- moves

local hinge = workspace.HingeOfRotation
local rotation_objects = {
local hingePos = hinge.Position

for i = 1, 90 do -- 90 degree iterations 
    for _, v in pairs(rotation_objects) do
        v.CFrame = * CFrame.Angles(math.rad(i),0,0) *, 1.08 ,0)

So basically, my question is how do you rotate multiple parts on a axis of one of the parts without the other parts clumping together to have a common center?

Can you give me the script? I want to see what's wrong. If you have some other scripts related to it, show that too. Adios. Sensei_Developer 272 — 5mo
I added a script AltNature 169 — 5mo

Answer this question