Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

My sound zone isnt working and output is BLANK?

So here is the First part

FirstZone=workspace.Dry
FirstZoneSound=workspace.Dry.DrySound

You see they are both not labeled nil, right? these are:

SecondZone=nil
SecondZoneSound=nil

ThirdZone=nil
ThirdZoneSound=nil

FourthZone=nil
FourthZoneSound=nil

FifthZone=nil
FifthZoneSound=nil

SixthZone=nil
SixthZoneSound=nil

SeventhZone=nil
SeventhZoneSound=nil

EighthZone=nil
EighthZoneSound=nil

NinthZone=nil
NinthZoneSound=nil

TenthZoneZone=nil
TenthZoneZoneSound=nil

Thats what I expected. Now when I do this script (inside StarterPlayerScripts because I don't use that):

while FirstZone == not nil do
	wait(.001)
	if FirstZone.Touched then
	FirstZoneSound.Playing = true elseif
	
	 FirstZone.TouchEnded then
		FirstZoneSound.Playing = false
	end
end

I expected the sound zones to work but instead I got a dumb blank output. Any help?

1 answer

✓ Accepted answer
FirstZone.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild("Humanoid") then
       		FirstZoneSound.Playing = true
	end
end)

FirstZone.TouchEnded:Connect(function()
	FirstZoneSound.Playing = false
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.