Tool Sound Not Playing

I’m working on a revolver tool and was attempting to add a fire sound, but it’s not seeming to work. Originally, I implemented the sound part of the script into the main script in the weapon but since it wasn’t working, I made its own separate Local Script.

local debounce = false
local tool = script.Parent
local sound = tool:WaitForChild("Sound")

tool.Activated:connect(function()
	if not debounce then
		debounce = true
		sound:Play()
		wait(1.5)
		debounce = false
	end
end)

Anything helps, thank you for your time!

First make sure you have no errors in the console.
If you’re clear there, make sure the sound is somewhere it can actually be “played”
The sound has to be parented to a part such as the Tools Handle, otherwise it’s not parented to something to play from. The Tool Object doesn’t have it’s own place in the workspace, the parts of it do.
If that’s also right, make sure the Instance itself doesn’t have any issues, such as an invalid audio ID, time position, or wrong volume.

1 Like

Try setting “RequiresHandle” to False.

1 Like

I think you honestly could use Script.Parent.Parent.ToolName.Sound

The sound should be inside the tool or whatever you want to use to call the sound. I hope this helps some, if not I’m sorry I’m kinda new <3

Local Sound = script.parent.parent.parent.ToolName.TheSoundName

For example

1 Like

Well if you put the sound inside whatever tool you can use script.parent.parent.ToolName.SoundName

So technically you can, I could be wrong I’ll double check later LOL

1 Like

I think it doesnt matter where u put the sound, but u should actually call it’s variable. Example:
local sound = game.Workspace.Sound

1 Like

Try doing this:

local debounce = false
local tool = script.Parent
local sound = tool:WaitForChild(“Sound”)

tool.Activated:connect(function()
if debounce == false then
debounce = true
sound:Play()
wait(1.5)
debounce = false
end
end)

1 Like

Changed line 3 to:

local sound = tool:WaitForChild(“FireSound”)

It worked! Tysm

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