Car idle sound not looping?

Hello there! I’m using an A-Chassis Idle sound script for my car. But everytime the idle sound finished playing, the sound will stop and not loop even tho I ticked LOOPED in the audio.

		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]
local FE = workspace.FilteringEnabled
local car = script.Parent.Car.Value
local _Tune = require(car["A-Chassis Tune"])
local on = 0

script:WaitForChild("Idle")



if not FE then
	for i,v in pairs(car.DriveSeat:GetChildren()) do
		for _,a in pairs(script:GetChildren()) do
			if v.Name==a.Name then v:Stop() wait() v:Destroy() end
		end
	end
	for i,v in pairs(script:GetChildren()) do
		v.Parent=car.DriveSeat
	end
		car.DriveSeat.Idle:Play()

	
	while wait() do
		local _RPM = script.Parent.Values.RPM.Value
		
		if not script.Parent.IsOn.Value then on=math.max(on-.015,0) else on=1 end
    car.DriveSeat.Idle.Pitch = (car.DriveSeat.Idle.SetPitch.Value - car.DriveSeat.Idle.SetRev.Value*_RPM/_Tune.Redline)*on^2
end
else
	local handler = car.AC6_FE_Sounds
	handler:FireServer("newSound","Idle",car.DriveSeat,script.Idle.SoundId,0,true)
	handler:FireServer("playSound","Idle")

	local pitch=0

	while wait() do
		local _RPM = script.Parent.Values.RPM.Value
		
		if not script.Parent.IsOn.Value then on=math.max(on-.015,0) else on=1 end
		pitch = (script.Idle.SetPitch.Value - script.Idle.SetRev.Value*_RPM/_Tune.Redline)*on^2
		handler:FireServer("updateSound","Idle",script.Idle.SoundId,pitch,script.Idle.Volume)
	end
end
1 Like

How did you handle this remoteEvent?

1 Like

Can’t you just loop with this?:

local plrs = game:GetService("Players")
local plr = Players.LocalPlayer
local Humanoid = plr:FindFirstChild("Humanoid")
local seat = script.Parent
local Static = game.Workspace.Seat.Script.Sound

if Humanoid.Seated == true then do
     while true do
     Static:Play()
   end
end

if Humanoid.Seated == false then do
     while true do
     Static:Stop()
   end
end

function SeatedOrNot()     -- just an test function
   print(Humanoid.Seated)
end
1 Like

Did not work. I’ll try finding some free models on the catalog. Thanks anyways :smiley:

I don’t know. I’m really bad at scripting and that’s from A-Chassis.

Is the idle sound’s looped property enabled?

yup it is enabled. i gave up making that game lol.