#Background Sound IN GUI

8 messages · Page 1 of 1 (latest)

hushed bone
#

How can i add a
How could I add a background sound, but when I press the play button it stops playing?

rocky ingot
#

u jus do

acoustic blaze
#
ss = game:GetService("SoundService")
uis = game:GetService("UserInputService")
s = ss.s
s:Play() -- set the sound property to looped
uis.InputBegan:Connect(function(input)
    if input.KeyCode == Enum.KeyCode.M then
        s:Stop()
    end
end)
uis.InputBegan:Connect(function(input)
    if input.KeyCode == Enum.KeyCode.N then
        s:Play()
    end
end)

this is my example
#

if you dont understand any part of it lmk

#

the uis could just be a button click or whatever

rocky ingot
#

fr fr

hushed bone
#

ok ty

rocky ingot
#

yw