So, I'm trying to make a main menu GUI for my game, and so far, everything is in order, no errors, but when I click the TextLabel that the script is in, it doesn't close the menu and enter the game, like it should. Can anyone help? I think it might have to do with 'MouseButton1Click', but I'm not sure. SCRIPT:
--Location of GUI and script Workspace>StarterGui>ScreenGui>Frame>PLAY(aka textlabel)>LocalScript
function click() game.Players.LocalPlayers.PlayerGui.ScreenGui.Parent = nil end
function enter() game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame.PLAY.BorderColor3 = Color3.new(255,255,255) end
function leave() game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame.PLAY.BorderColor3 = Color3.new(0,0,0) end
script.Parent.MouseButton1Click:connect(function(click) script.Parent.MouseEnter:connect(function(enter) script.Parent.MouseLeave:connect(function(leave)
end) end) end)
You Are Using A Text Label Not A Text Button XD Should Also Error As MouseButton1Click Is Not A Child Of A Text Label But Rather A Text Button So Use A Text Button Basically!