So for a little bit, I was a bit confused on how i should be doing as According to Docs, BodyGyro should be replaced with AlignOrientation due to its Deprecation a while back, but I’m to update some old code that I found within one of my friends games to have the properties from BodyGyro
to match AlignOrientation
, but after looking at their Properties and Requirements, I’m confused on how to do this.
So this is the BodyGyro
part of the script that I am Attempting to Update:
local BodyGyro = Instance.new("BodyGyro") -- Instance
BodyGyro.Name = "Gyro" -- Name
BodyGyro.MaxTorque = Vector3.new(math.huge, math.huge, math.huge) -- MaxTorque
BodyGyro.D = 50 -- How much Dampening to use to reach the CFrame goal
BodyGyro.P = 500 -- How Agressive the Torque is
BodyGyro.Parent = HumanoidRootPart -- Parent
BodyGyro.CFrame = HumanoidRootPart.CFrame -- Parent's CFrame
But, to add a little bit of info, This is Supposed to be a Swimming Script and the BodyGyro
is supposed to Rotate the Player a specific Direction when they press a certain key on their Computer.
But as I stated before, BodyGyro
is now Deprecated, and Recommended by ROBLOX to use AlignOriendation
Instead, and to explain what I’m confused about:
For the First thing, BodyGyro
and AlignOrientation
has different Properties, and some are Missing from BodyGyro
, like D
, and P
. This could just be me not knowing what the Properties are, or what they are now named in AlignOrientation
.
The Second thing is Attachments
, I’m not sure how I should be using Attachments
as AlignOrientation
uses Atachments
, I know how to change from TwoAttachments
to OneAttachment
but I dont see how that would help, and even if it is, I dont know How should I be Positioning it.
Can anybody help with this?