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

How to CFrame BodyGyro Tilt for VehicleSeat?

Asked by 5 years ago

Hello,

I do not know anything bout CFrame and BodyGyro,

I'm just trying to get my VehicleSeat to tilt is all when you turn but ya, I have no idea how to do that using above mentioned method.

if (VehicleSeat.Steer > 0) then
VehicleSeat.BodyGyro.CFrame = VehicleSeat.CFrame * CFrame.fromEulerAnglesXYZ(0,-0.1, 0)
VehicleSeat.BodyGyro.CFrame = CFrame.new(VehicleSeat.Position, Vector3.new(0,0,0)
elseif (VehicleSeat.Steer < 0) then
VehicleSeat.BodyGyro.CFrame = VehicleSeat.BodyGyro.CFrame * CFrame.fromEulerAnglesXYZ(0,0.1, 0)
elseif (VehicleSeat.Steer == 0) then
VehicleSeat.BodyGyro.CFrame = VehicleSeat.BodyGyro.CFrame
end

Here is my code, and notice I put Vector3.new(0,0,0). I just odnt know how to get it right. Ive had the seat doing flips and what not but ya..

thank you, appreciate it.

0
You would be better off just changeing the offset for the weld that is made when the player sits User#5423 17 — 5y
0
indent your code Sublivion 1 — 5y
0
Seriously? Indent your code is all you are going to say? You realize I didnt indent it because it throws it off due to the text box not being accomadating to the amount of code posted. Bog off Decimaprism 65 — 5y

Answer this question