Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Does :Pause() Work Anymore?

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.

1 answer

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.

4 comments

0

Oh, I forgot to clarify that I meant it only stops and resets the song, not pausing it like I think it would do.

0

Yes, and it does that, but I still don't see why did you accept my question q.q.

0

answer*

0

I found the answer, instead of using Play() I use Resume() And it stays at the place

This discussion is preserved as it was. New answers, comments, and votes are closed.