Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to stop a part from rotating?

I'm making a Elevator.

Before this, I had never used BodyMovers or Welds.

The elevator is moved by a BodyPosition, to one part, the floor.

The walls and roof are welded to the floor.

It works, yes.

But whenever 2 or more people get on, it leans.

I've tried BodyGyro, I'm not sure what to set the CFrame to? I set it to Floor.CFrame BEFORE I unanchored it.

local BodyGyro = Instance.new("BodyGyro")
BodyGyro.CFrame = Base.CFrame
BodyGyro.MaxTorque = Vector3.new(9999999,9999999,9999999)
BodyGyro.P = 200
BodyGyro.Parent = Base

1 comment

1

Give it more power on line 4? I would say 10000, maybe more.

1 answer

You could also do this for example:

local rs = game:GetService("RunService");
local base -- Assign this variable to base.
local rot = base.Rotation;

rs.RenderStepped:connect(function() -- Updates every frame
	base.Rotation = rot; -- Reassigns the rotation to the original stable one.
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.