Hello, I’m working on a bike and I’m in the 1st step of the scripting, making the bike stand up when someone gets on it.
I started searching about align orientation but I didn’t understood well how to use it. So I decided to use bodygyro, when i ended the script i noticed that body gyro restrics all axis of orientation but I just want to change one
script:
local Bike = script.Parent
local Seat = Bike.VehicleSeat
Seat:GetPropertyChangedSignal("Occupant"):Connect( function()
if Seat.Occupant then
local BodyGyro = Instance.new("BodyGyro")
BodyGyro.Parent = Bike.PrimaryPart
BodyGyro.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
BodyGyro.P = 1000
BodyGyro.D = 100
BodyGyro.CFrame = CFrame.Angles(0, 0, math.rad(0))
end
end)
Issue:
So, I’m using bodygyro wrong or I should use align orientation? Any help would be appreciated.