I want to make a Title Screen with ScreenGuis, but the "Play" button isn't working. This is the code that I have been trying to tinker with:
wait(0.25)
local Screen = script:WaitForChild('TitleScreenGui') -- ScreenGui
local screen = Screen:Clone() -- ScreenGui that will be put into the PlayerGui
game.Players.playerAdded:connect(function(player)
local startergui = player:WaitForChild('PlayerGui') -- PlayerGui
screen.Parent = startergui -- ScreenGui put into PlayerGui
screen.Enabled = true
end)
screen.Child.Child.Child.MouseButton1Click():connect(function(player)
-- screen.Child.Child.Child is the "Play" button
screen.Enabled = false
end)
I searched and read about TextButton and MouseButton1Click many times but I still can't figure it out.

3 comments
Are there any errors, which lines? Also, try MouseButton1Down. Not sure if that'll make a difference. Edit-- I think the problem is that you cannot do script.Child unless the object is named "Child". You have to use the actual name of the object.
Is the name of the script.Child Actually child? if not that would not work
No, it is named "Frame"