Sound cuts off when playing it again

So in the video, it’s kinda hard to tell, but the bang gets cut off when playing it again. (I’ve had this problem other times)

warning it is a little loud

3 Likes

Post your script here so we can see how you are playing the sound.

1 Like

Oh yeah sorry I forgot about that, here it is

local tool = script.Parent
local slider = tool.Slider
local handle = tool.Handle
local mag = tool.Magazine
local base = tool.Base
local sound = base.Sound

local userInputService = game:GetService("UserInputService")

tool.Activated:Connect(function()
	sound:Play()
end)

--userInputService.InputBegan:Connect(function(input, gameProcessedEvent)
--	if input.UserInputType == Enum.UserInputType.MouseButton2 then
		
--	end
	
--end)
1 Like

I don’t have audio on my computer so I’m just going by your statements.
From what I’ve heard you should load the sound before you start using it in a script. Maybe it’s loading each time?
Every time the Tool is Activated it fires your function so if it gets activated again so it’s overriding the first one.
Sound has a property IsPlaying that you can check to see if a sound is already playing. You’d need to play the sound again to keep both audible.

2 Likes

You’re playing the same sound over and over again right? When you play the same sound again while its already playing, the sound gets cut off in the middle and it replays from the beginning.

Try cloning the sound and play the cloned sound when the tool is activated, and delete the clone once its done playing, it might work.

4 Likes

Alternatively, you could do as this says but enable PlayOnRemove so you don’t have to script waiting for the sound to be done playing to remove the sound

2 Likes