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

How to stop a part from rotating?

Asked by
Vezious 310 Moderation Voter
8 years ago
Edited 8 years ago

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
Give it more power on line 4? I would say 10000, maybe more. User#11440 120 — 8y

1 answer

Log in to vote
0
Answered by
jtefurd 50
8 years ago

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)
Ad

Answer this question