I'm trying to get my character select GUI to disappear once a character is selected, but this script doesn't seem to work
script.Parent.MouseButton1Click:connect(function()
local Cover = game.StarterGui.CharSelect.BlackScreen:WaitForChild('BookHolder')
Cover.Visible = false
game.StarterGui.CharSelect.BlackScreen.BackgroundTransparency = 1
end)
BookHolder is the frame holding the Button that is to be pressed
I've tried to set it as "Player.PlayerGui." but got no luck as it said that it couldn't find "Player" Should the code above be on a local or normal script?
this is how it is opened
script.Parent.ClickDetector.MouseClick:connect(function(Player)
Player.PlayerGui.CharSelect.BlackScreen.BackgroundTransparency = 0
Player.PlayerGui.CharSelect.BlackScreen.BookHolder.Visible = true
end)
this opens it fine, just don't know why it isn't closing
Thanks for help in advanced :)
