0

# I need help with a Toggle Visibility script? SOLVED

Asirix 15
7 years ago

So, I really have no clue at this point. I was told to you elseif instead of if in the 4 fourth line. Well... it didn't work. SO, I guess I need some help.

Here it is:

script.parent.MouseButton1Click:connect(function(Open)
end
end)


I have also tried.

function open()
end
end

script.Parent.MouseButton1Click:connect(open)


Any suggestions or fixes?

Wow, it was actually very easy. Redid the code. XD

function open()
end

script.Parent.MouseButton1Click:connect(open)


0

Well you don't really need elseif, given that you are checking if it's not visible... That means there are only two possible things that could happen so if the first one is false the other one has to be true. Just put an else and see if it helps somehow

0
u_g 90
7 years ago

I'm not sure, but maybe it's because you're using "game.StarterGui". You see, if this is a Gui inside of your "game.Players.Player.PlayerGui", then you would need to use that instead of "game.StarterGui". Right now, I think you're changing the visibility of the Gui that is in the StarterGui, and not the one that is actually in your PlayerGui.