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

how do I make my music gui work on local player and work even if a player dies?

Asked by 6 years ago
Edited 6 years ago

so I got this mute music script and when I press the button everything works but there are 2 problems when I click it mutes everyones music and also when I reset the gui stops working how do I make this gui work all correctly

also when I die not only that the gui stops working but the image sets back alone to unmuted image even if the music has been muted before I die

Music = script.Parent.Parent.Parent.Sound
hidden = 1
function RunGui()
if hidden == 1 then 
    hidden = 2
    script.Parent.Image =  "http://www.roblox.com/asset/?id=202000937"
    Music.Volume = 0
else
    hidden = 1
    script.Parent.Image =  "http://www.roblox.com/asset/?id=202000870"
    Music.Volume = 0.4
end
end
script.Parent.MouseButton1Down:connect(RunGui)
0
Where does “Music” lead to? Also, disable “ResetOnSpawn” in the ScreenGui. That’ll prevent your GUI from resetting once you die. User#20279 0 — 6y

Answer this question