I want to make a reverse sound play when you are past a certain velocity and a constraint at a certain angular velocity but using = breaks the whole script.
Train = script.Parent.Train Train.Value = script.Parent.Parent function ThrottleHandle() if Train.Value.DriveSeat.Throttle == 1 and Train.Value.DriveSeat.Velocity.Magnitude > 10 and script.Parent.Parent.Arm.A1.HingeConstraint.AngularVelocity = -5 then script.Parent.Parent.Body1.TAILGATE.Main.Reverse:Play() script.Parent.Parent.Body1.TAILGATE.Main.Reverse1:Play()
elseif Train.Value.DriveSeat.Throttle == 0 then
elseif Train.Value.DriveSeat.Throttle == -1 and Train.Value.DriveSeat.Velocity.Magnitude < 10 then
script.Parent.Parent.Body1.TAILGATE.Main.Reverse:Stop()
script.Parent.Parent.Body1.TAILGATE.Main.Reverse1:Stop()
---
end
end
Train.Value.DriveSeat.Changed:connect(ThrottleHandle)
Hereβs a picture of the error message.
Please reply if you have a solution.