Is it possible to pause a game?

my game has subtitles for the characters voices, lets say the player pauses the game at that time, would it be possible to pause the audio and the subtitles to like “freeze” ?

8 Likes

SoundInstance:Pause() and :Resume exist.

You could pause the subtitle loop by using a repeat until loop and seeing if the pause value is set to false again.

1 Like

yes you can,

if your rigs have animations, just use :Pause and :Resume, same for sounds as @awry_y said

1 Like

Animations don’t have :Pause and :Resume. You need to use Track:AdjustSpeed(0) to pause an animation.

2 Likes

you’re right, im sorry

1 Like

SoundInstance:Pause() does this apply to all sounds in game? or do i have to pause every sound?

also im using subtitles with text labels

No this cannot be forgiven, now empty the compartments of your pantaloons and discard all your valuables. In fact, I am the one equipped to casually summon little travis on your buffon stuff.

You need to do it for each sound as for subtitles, I would need to see your code for that.

3 Likes

the way i use the sounds and labels is by receiving a certain value and then display them with like a
play:() and using waits to display the textlabels so they cant match the audio

1 Like

Your still using a loop right? Assuming you have a value that indicates the pause status. You could add this in your loop:

if Pause.Value then
     repeat
          task.wait(0.1)
     until not Pause.Value
end
1 Like


this is how im doing it (i havent started the pause thing yet, im still wondering how am i doing it)

1 Like

Same concept then, just slap on the script after the waits and you’ll be done.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.