Credit = script.Parent.Credit
Frame = script.Parent.Frame
TextLabel = Frame.TextLabel
Credit.MouseButton1Click:Connect(function()
if Credit.Visible == true and Frame.Visible == false then
Frame.Visible = true
Credit.Visible = false
elseif
Credit.Visible == false and Frame.Visible == true then
Frame.Visible = false
Credit.Visible = true
end
end)
COMMUNITY QUESTION
Why does my credit menu screen script not work I did everything right though?
2 answers
Credit.MouseButton1Click:Connect(function()
Frame.Visible = not Frame.Visible
end)
1 comment
0
Easiest way to do it and it's more efficient.
it should be this instead. give it a try
Credit = script.Parent.Credit
Frame = script.Parent.Frame
TextLabel = Frame.TextLabel
Credit.MouseButton1Click:Connect(function()
if Credit.Visible == true then
if Frame.Visible == true then
Frame.Visible = true
Credit.Visible = false
end
end
end)
Credit.MouseButton1Click:Connect(function()
if Credit.Visible == false then
if Frame.Visible == true then
Frame.Visible = false
Credit.Visible = true
end
end
end)
sometimes breaking things down may be the fix. Not guaranteeing anything though
1 comment
0
This is the exact same thing as what he has posted - but with two functions, there is more likely than not going to be no difference. Can't hurt to try though.
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
Can you provide a visual interpretation of your goal - since nothing here is incorrect? It may also help to provide what the current outcome is.
im trying to make it so that if I click the Credit button The frame will come up and if i click again the frame will go down invisible
Well you don't need to check the Frame's visibility - just set it after the initial check. Try that and see if it makes any difference.