Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Does :Pause() Work Anymore?

Asked by 8 years ago

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

Log in to vote
0
Answered by 8 years ago

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.

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. SpazzMan502 133 — 8y
0
Yes, and it does that, but I still don't see why did you accept my question q.q. SwaggyDuckie 70 — 8y
0
answer* SwaggyDuckie 70 — 8y
0
I found the answer, instead of using Play() I use Resume() And it stays at the place SpazzMan502 133 — 8y
Ad

Answer this question