Why does't this script work?

This script turns the volume to every sound including the ones that are not called “Big Blood Damage __”.

Why is this?

while on == true do
			wait()

			bloodFolder["Big Blood Damage 3"].Volume = 0
			bloodFolder["Big Blood Damage 2"].Volume = 0
			bloodFolder["Big Blood Damage 1"].Volume = 0

			for i,v in pairs(workspace:GetDescendants()) do
					if v.Name == "Big Blood Damage 1" or "Big Blood Damage 2" or "Big Blood Damage 3" then
					if v:IsA("Sound") then

						v.Volume = 0

						

						 
						
					end
					
				elseif v.Name == "Fire" or "BloodSound" or "firee" or "EarRinging" or "Heartbeat" then

				end
			end
		end```
while on == true do
	wait()
	bloodFolder["Big Blood Damage 3"].Volume = 0
	bloodFolder["Big Blood Damage 2"].Volume = 0
	bloodFolder["Big Blood Damage 1"].Volume = 0
	for i,v in pairs(workspace:GetDescendants()) do
		if v.Name == "Big Blood Damage 1" or v.Name == "Big Blood Damage 2" or v.Name == "Big Blood Damage 3" then
			if v:IsA("Sound") then
				v.Volume = 0
			end
		end
	end
end

should work i believe

its to do with the checking the names of V im guessing, but why do you need a for loop if you’re just setting the volumes directly?

yes, this worked. idk why i didn’t see that but thank you !

when i was testing, the volume wouldn’t stay to what i set it as in the folder in RS. So, i just made a loop and had it continuously set all of the sounds in that folder to a volume of either one or zero, depending on the setting.
(im not good at explaining things so i hope you understand)

im sure theres a more efficient way to do this, but im learning.
is there a better way that you can see?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.