I made a script that gives you a different GUI depending on the name of an object. However, the script only works if the object has the specified name, and doesn't give you any GUI if the name is different. Here is the script:
function loadscreen(Player)
if script.Parent.Parent.Name == "TB" .. Player.Name then
if not Player.PlayerGui:FindFirstChild("Gui") then
local gui = script.Gui:clone()
gui.Parent = Player.PlayerGui
else
if not Player.PlayerGui:FindFirstChild("nope") then
local guin = script.nope:clone()
guin.Parent = Player.PlayerGui
end
end
end
end
script.Parent.ClickDetector.MouseClick:connect(loadscreen)
The part of the script after the 'else' part is the part that does not work. There are no errors in the output. Please help?

2 comments
?
I'm blind and I thought I saw a spelling mistake xD