function VehicleSoundComponent.updateSounds(S)local w=S.controller:getSpeed()if w and w<3 then(TweenService:Create(S.idle,tweenInfo,{Volume=.3})):Play();(TweenService:Create(S.engine,tweenInfo,{Volume=w/5})):Play()else(TweenService:Create(S.idle,tweenInfo,{Volume=0})):Play();(TweenService:Create(S.engine,tweenInfo,{Volume=.8,PlaybackSpeed=.5+((w or 0)+math.random(0,20))/100})):Play()end end
--[[
    Turns brake lights on or off depending on the status
]]
function VehicleSoundComponent:updateSounds()
	local speed = self.controller:getSpeed()

	if speed and speed < 3 then
		TweenService:Create(self.idle, tweenInfo, { Volume = 0.3 }):Play()
		TweenService:Create(self.engine, tweenInfo, { Volume = speed / 5 }):Play()
	else
		TweenService:Create(self.idle, tweenInfo, { Volume = 0 }):Play()
		TweenService:Create(
			self.engine,
			tweenInfo,
			{ Volume = 0.8, PlaybackSpeed = 0.5 + (((speed or 0) + math.random(0, 20)) / 100) }
		):Play()
	end
end
