-- Function to turn particles on or off

local function ConfigWater()
	for _,v in pairs(Emitters:GetChildren()) do
		if v and v:FindFirstChild("Emit1") then
			v:FindFirstChild("Emit1").Enabled = IsOn.Value
		end
		if v and v:FindFirstChild("Emit2") then
			v:FindFirstChild("Emit2").Enabled = IsOn.Value
		end
	end
	
	if ShouldEmitSound.Value and IsOn.Value then
		WaterLoop:Play()
		TweenVolume(WaterLoop.Volume,MaxVolume.Value,2.5,false)
	elseif not IsOn.Value or not ShouldEmitSound.Value then
		TweenVolume(MaxVolume.Value,0,2.9,true)
	end
end
