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

How to stop effect of bodygyro correctly?

Asked by 6 years ago

Hey guys, I am currently dropping characters off from a high point and trying to get them to look like they're skydiving. I set the torso CFrame and play an animation, and it starts off fine, but halfway through they begin to stand up and no longer have the skydive animation. I was able to get them to stay in the lying position with platformstand but that conflicted with me trying to stop the animation, so does anyone know how I can keep the players body in a lying down position, and then properly get them back upright? ( I'm using a bodygyro too,it just won't stay lying down. )

char.UpperTorso.CFrame = workspace.Plane.CFrame char.Humanoid.PlatformStand = true char.UpperTorso.CFrame = CFrame.new(Vector3.new(), Vector3.new(0,-1,0)) + char.UpperTorso.CFrame.p local bodyGyro = Instance.new('BodyGyro', char.HumanoidRootPart) bodyGyro.MaxTorque = Vector3.new(0, 1337000, 0) bodyGyro.P = 3000 bodyGyro.D = 500 bodyGyro.CFrame = CFrame.new(Vector3.new(), Vector3.new(0,-1,0)) -----^ puts them in lying down position

        char.UpperTorso.CFrame = CFrame.new(Vector3.new(),Vector3.new(0,1,0)) + char.UpperTorso.CFrame.p
        char.HumanoidRootPart.BodyGyro.CFrame = CFrame.new(Vector3.new(), Vector3.new(0,1,0))
        char.HumanoidRootPart.BodyGyro:Destroy()
        char.Humanoid.PlatformStand = false

my attempt at putting them upright but simply makes the character spin like crazy

1 answer

Log in to vote
0
Answered by 6 years ago

To stop the effect of bodyGyro, just set the maxtorque to Vector3.new(0,0,0)

0
sorry for the poorly worded question, managed to fix this anyways masterblokz 58 — 6y
Ad

Answer this question