Hingeconstraint's motor angularspeed doesnt change through script

  1. What do you want to achieve?
    make angularspeed property change through script
  2. What is the issue?
    I was making simple car but its just cant got forwards or backwards, only turn the front wheels. happens due to script just dont set value to “angularspeed” property.
  3. What solutions have you tried so far?
    I checked for working event, its working
    and now I have no idea whats happening
    also theres no error in output
local seat = script.Parent.VehicleSeat
local FR = script.Parent.FR
local FL = script.Parent.FL
local BR = script.Parent.BR
local BL = script.Parent.BL
local sa = 30 -- aka: "steer angle"
local spd = 30

seat:GetPropertyChangedSignal("Steer"):Connect(function()
	FL.steerL.HingeConstraint.TargetAngle = sa * seat.Steer
	FR.steerR.HingeConstraint.TargetAngle = sa * seat.Steer
end)

seat:GetPropertyChangedSignal("Throttle"):Connect(function()
	FL.wheel.wheelcon.AngularSpeed = spd * seat.Throttle
	FR.wheel.wheelcon.AngularSpeed = spd * -seat.Throttle
	BL.wheel.wheelcon.AngularSpeed = spd * seat.Throttle
	BR.wheel.wheelcon.AngularSpeed = spd * -seat.Throttle
end)

Is your hinge set to ActuatorType set to servo, and have you set ServoMaxTorque?

my hinge actuator type set to motor as said in title

Ok in that case you would need to use the motor properties (MotorMaxAcceleration, MotorMaxTorque, AngularVelocity), or switch to servo ActuatorType as AngularSpeed is for servo

1 Like

I used angularvelocity instead of angularspeed and now this working, thanks

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.