The following script only works in PlaySolo, but not in an actual server.
while true do wait() if game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame.Visible==false then game.Workspace.Sound:Play() break end end
The problem was solved by somebody on the ROBLOX forums! Thnx wazap!
You can't get LocalPlayer from a normal script, that's what it looks like you're trying to do.
local fr = game.Players["Azarth"]:WaitForChild("PlayerGui").ScreenGui.Frame fr.Changed:connect(function(ob) if ob == "Visible" then if not fr.Visible then Workspace["Sound"]:Play() end end end)
Locked by TheMyrco
This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.
Why was this question closed?