Its suppose to destroying the GUI when you leave the room, but it's not...why?
local player = game.Players.LocalPlayer
script.Parent.Touched:connect(function(player)
if player.PlayerGui.DJPanel.MusicScreen.Visible == true then
player.PlayerGui.DJPanel:Destroy()
if player.PlayerGui.DJPanel.EffectScreen.Visible == true then
player.PlayerGui.DJPanel:Destroy()
if player.PlayerGui.DJPanel.Frame.Visible == true then
player.PlayerGui.DJPanel:Destroy()
end
end
end
end)

5 comments
What kind of a script, and where is the script located?
It's a local script, and its located in the part.
Local scripts must be placed into a descendant of the Player. So put the script inside 'Starterpack' or 'StarterGui'
Still didn't remove the gui.
Local Guis must be put inside StarterGui