Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make entire model rotate in viewport gui?

Asked by
TechModel 118
3 years ago

With help from the roblox dev site, I got this that can rotate a piece, but not a model. I'm really new with in pairs stuff, but I don't know how to use it yet.

Script in model

local part = script.Parent

local incr = 360/20

-- Rotate the part continually
while true do
    for deg = 0, 360, incr do
        -- Set only the Y axis rotation
        part.Rotation = Vector3.new(0, deg, 0)
        -- A better way to do this would be setting CFrame
        --part.CFrame = CFrame.new(part.Position) * CFrame.Angles(0, math.rad(deg), 0)
        wait()
    end
end

1 answer

Log in to vote
0
Answered by 3 years ago

I think welding all the parts of the model to script.Parent using weldconstraints should work.

0
Did but only one part is rotation or none TechModel 118 — 3y
0
Did you set Part1 to script.Parent and Part0 to all the other parts? JustinWe12 723 — 3y
Ad

Answer this question