ReverbSoundEffect's

  1. What do you want to achieve?
    When the player touches this invisible wall/meaning they enter the building, this sound effect inthe sound will enable.

  2. What is the issue?

local pitch = game.Workspace.Sound.ReverbSoundEffect

script.Parent.Touched:Connect(function()
	if pitch.Enabled == false then
		pitch.Enabled = true
	else
		pitch.Enabled = false
	end
end)

Script doesn’t do anything.

Am I doing something wrong, is this not possible?

1 Like

Hello there.
I checked your code and I found issue. Issue is that you said pitch.Enabled which is not how you play sound. To play sound you need to use [sound]:Play

I remade code and its almost same. It works for me :smiley:

local pitch = workspace.Sound.ReverbSoundEffect

ac = false --- Prevents multiple sounds playing at same time

script.Parent.Touched:Connect(function()
	if ac == false then ---- Checks if sound is already playing
		ac = true
		pitch:Play()
		wait(1) --- Waits until sound ends (Change this to daturation of your sound)
		pitch:Stop()
		ac = false
	else
	end
end)

Also you can find out more about sound on roblox here: Sound | Roblox Creator Documentation - Roblox Developer Hub

Just put the sound in a Transparent, CanCollide false Part the size of the room. You can change the RollOffMin and RollOffMaxDistances to the size of the Part so you can only hear it while you’re in the Part.
Sound used to come from the center of the Part, but now the outside surface is where it begins as per this announcement: Volumetric Sounds Public Release

EDIT: Do you mean that you have a global sound that you want to change the pitch of while your’e inside the building?
My method might work if you had the global sound playing all the time but played another sound while in the building so the combination would give the effect of the sound pitch change while they’re in the building.
It would be easier if you didn’t have to script anything.

This still isn’t working, no errors or anything.

Is ‘workspace.Sound.ReverbSoundEffect’ a sound instance? Can you select it in the workspace and press play and hear a sound? I’d start with that test.

No… That’s why I have been using .enabled. But it doesn’t turn on or anything.

Okay, so the sound is:
workspace.Sound
That should be a valid sound that you can select in workspace and click play and hear something, verify this is true.

Then the workspace.Sound.ReverbSoundEffect is something you can enable and disable, but the sound may have to be stopped and played again, im not sure if you can change effects on the fly.

you need a variable for the Sound in order to play it.

Is the sound playing on a loop when the game runs? Can you hear it? And you expect it to change and it isn’t? Explain what you hear and what you expect to hear and are not hearing.

I have a basic music system switching between many song id’s. What I want to happen is if you touch this block/wall the Reverb Sound effect will turn on. Right now nothing happens.

Also, I have done some testing and found out that the touched function isn’t going through.

script.Parent.Touched:Connect(function()
	print("Touched")
end)

When I touch the part it doesn’t print.

I have been doing this in a local script and realised it is only working in a server script. I could just do server - Client event.

I figured it out, just needed to put the local script into starter player scripts.

2 Likes