Hello, I made this script to make my vehicle function it goes forward fine. When I try to turn nothing happens it works when I manually. I used a print to constantly print the values and its working fine. Any ideas to fix it? Thanks for your help in advance.
local DriverSeat = script.Parent.VehicleSeat
DriverSeat:GetPropertyChangedSignal("Throttle"):Connect(function()
for i,v in pairs(script.Parent:GetDescendants()) do
if v.Name == "MotorConstraint" then
v.AngularVelocity = DriverSeat.Throttle * 100
end
end
end)
local LeftTurn = script.Parent.Left.HingeConstraint.TargetAngle
local RightTurn = script.Parent.Right.HingeConstraint.TargetAngle
DriverSeat:GetPropertyChangedSignal("Steer"):Connect(function()
LeftTurn = 30 * DriverSeat.Steer
RightTurn = 30 * DriverSeat.Steer
end)
while wait(0.1) do
print(RightTurn)
end