Tools sound compete glitched

Hey guys!

I’m having trouble with sounds. For the past day I’ve had to put my guns on hold due the sounds not playing. Every time I try to script the sounds in on the gun I get no errors and they don’t play. But for example when I put a part in the workspace and make it so once touched plays the audio I want it works. It’s not working for the tool.

Any fix’s or help would be loved

Btw to play the sound I locate it and use :Play()

Can you make sure to send the gun script where the sound is mean’t to play?

There is nothing rn with the code, I know this because I’m using prints after the sound is told to play and they print

How is the audio meant to play
Like when you equip the tool
If you click
etc

Yes, example if when the tool is equip the first line is audio playing, then to make sure It’s working I put a print under that line and the print plays. So I don’t know

Do you have a function to make sure the tool is equipped?

No here is a example of the code.

Gun.Equipped:Connect(function()
	
	script.Parent.MainPart.Equip:Play()
	print("Played")
	h.WalkSpeed = 16
	cooling = false
	equiped = true
	shoulders = true
	makeReady = false
	reloadings = false
	presentArms = false
	AfterFire = false
	ShoulderArms:Play()
	ShoulderArms:AdjustSpeed(0)
	cas:BindAction("leftButtonPressed", leftButtonPressed,true,Enum.UserInputType.MouseButton1)
	cas:BindAction("fKeyPressed", fKeyPressed,true,Enum.KeyCode.F)
	cas:BindAction("rKeyPressed", rKeyPressed,true,Enum.KeyCode.R)
end)

Are the sounds in the “Handle”.

Yes.
They are bascally in the handle, “MainPart” is my “handle” for my gun, my tool doesnt use handle because its mortoe6d so I weld the torso to the MainPart

Have you tried playing the audios like

game.StarterPack.Gun.MainPart.Equip:Play()

and seeing what happens?

I’ve never really used motor6d so I don’t know exactly how it works.

it works the same like any tool just allows the gun to be welded and freely moved (basically meaning I can use right arms)

Code doesnt work btw. I just got a error due to the tool getting moved to my backpack

Oh yea, forgot about that one second.

So I got it working. Pretty sure you don’t need the

	
	script.Parent.***MainPart***.Equip:Play()
	print("Played")

Try removing the MainPart from the code because the Parent is the main part.

image
worked just fine.
image

What are the pictures for and the three ***?

remove that from your code.
30 chars

Remove the ***??
Is that correct?

Hi. I’ve been making a gun recently. It’s desirable to :Clone() a sound from ReplicatedStorage that has PlayOnRemove enabled. This means that the sound can play in quick succession without sounding abrupt by stopping itself.