Before, my Title Screen worked perfectly. But after some other programming, it stopped working. What's the problem?

wait(0.25)
local Screen = script:WaitForChild('TitleScreenGui')
local screen = Screen:Clone()
local play = screen.TitleScreenBox.TitleText.PlayButton

game.Players.playerAdded:connect(function(player)
	local startergui = player:WaitForChild('PlayerGui')
	screen.Parent = startergui
	screen.Enabled = true
end)

play.MouseButton1Down:connect(function(player)
	screen:Destroy()
end)

Any help would be greatly appreciated!

6 comments

1

Try to maybe put "screen.Visible=true" instead of "screen.Enabled=true". I do not know if it is already visible before you clone it so I'm probably not right

0

^To add to that, you should probably use WaitForChild on line 4

0

You can't use Visible on ScreenGuis, only enable

0

I would have to do that for TitleScreenBox, TitleText, and PlayButton then

0

You can't use a local to clone something.

0

dude thanks