I edited a knife script that plays a song in the handle whenever you equip it, and it stops playing when you unequip it.
I wanted the song to stay at the place it left off, but even if I put Song:Pause() it still resets the song when I re-equip it.
I don't think, that it broke, I tried myself and this worked, but it didn't pause, it stopped. If you didn't, add a new script. Put this in:
local song = script.Sound script.Parent.Equipped:connect(function() song:Play() end) script.Parent.Unequipped:connect(function() song:Pause() end)
if you didn't open output, then you probably didn't find the reason, why it didn't work. You've probably wrote Unequipped
wrong, I did so and It played the song when I unequipped it.
As I said, it works like :Stop()
does, so you can use :Stop()
instead.