Hello
I made a script that when a player dies, a sound plays.
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
character.Humanoid.Died:connect(function(dead)
game.Workspace.assets.cannon:Play()
end)
end)
end)
It works, and after further research, I think this script is the problem.
I use a GUI to disable that script and re-enable, and it works, however, when I re-enable it, in Properties it is indeed enabled but doesn't work.
By the way, the button that disables the script has this script in it:
function onClick()
game.Workspace.cannon.Disabled = true
end
script.Parent.MouseButton1Click:connect(onClick)
To enable it I just change true to false.
What is happening and what can I do?

2 comments
Is the script in the button a local script or regular script?
You say the script works, but it's the problem?