Like for example when i fire it the audio plays then fades.
COMMUNITY QUESTION
How do you make it like tanks have firing sounds?
1 answer
-- Something like this
-- I would probably make with a click detector
local debounce = false
script.Parent.mouseClick:connect(function()
if debounce == true then -- keeps people from pressing it constantly
return
end
debounce = true
local audioID = "rbxassetid://258057783"
local audio = Instance.new("Sound", game.Workspace)
audio.SoundId = audioID
audio:Play()
for i = 10,0,-1 do -- where it starts fading
wait(0.3)
audio.Volume = audio.Volume -0.1
end
wait(3)
audio:Stop()
audio:Destroy() -- Destroys so it doesn't duplicate over and over everytime you click
debounce = false
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
I don't know how to do this, however it'd definitely involve something like MouseButton1Click:Connect()
The audio needs to be parented to a base part for it to be 3D sound.