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

How can I make a maximum angle with BodyAngularVelocity?

Asked by 7 years ago
function turn(move, direction)
    move.MaxTorque = Vector3.new(5000,50000000,0)
    if direction == "a" then
        move.AngularVelocity = Vector3.new(10,0.054,0)--.054
    elseif direction == "d" then    
        move.AngularVelocity = Vector3.new(-10,0.054,0)
    end
end

I want it to be so that if the part that the force is being applied to reaches a certain X rotation, the bodyangularvelocity will not apply any force to the X axis of the part, but I cant figure out how to do that. Does anyone know?

Also, if this is not possible or too difficult, I could use some help with BodyGyro, as whenever I use it, it always pushes the part to the exact same orientation, regardless of what I set the CFrame as.

Answer this question