--[[
    Instantiates object fields
]]

function VehicleSoundComponent:setup()
	local idle = CarSoundsFolder:FindFirstChild("Idle")
	local engine = CarSoundsFolder:FindFirstChild("Engine")
	local skid = CarSoundsFolder:FindFirstChild("Skid")
	local boost = CarSoundsFolder:FindFirstChild("Boost")

	self.idle = idle:Clone()
	self.engine = engine:Clone()
	self.skid = skid:Clone()
	self.boost = boost:Clone()

	self.idle.Parent = self.model.PrimaryPart
	self.engine.Parent = self.model.PrimaryPart
	self.skid.Parent = self.model.PrimaryPart
	self.boost.Parent = self.model.PrimaryPart

	self.idle.Volume = 0
	self.engine.Volume = 0
	self.skid.Volume = 0
	self.boost.Volume = 0

	self.idle:Play()
	self.engine:Play()
	self.skid:Play()
	self.boost:Play()

	coroutine.wrap(
		function()
			while self.model and self.model.Parent do
				self:updateSounds()
				wait(0.5)
			end
		end
	)()
end
