Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What is wrong with my leaderboard open and closing gui script?

Asked by
alsome495 -21
7 years ago
Edited 7 years ago

I am making a leaderBoard and i want it like Phantom Forces when you press Tab the leaderboard should pop up but it is not. Please help if you can.

local LeaderBoard.Main
press.Tab:connect(function()
        if Main.Visible = false then
            game.StarterGui.LeaderBoard.Main.Visible = true
        end
    end
end)

0
What is 'press' and what is the 'Tab' method? What error are you getting? duckwit 1404 — 7y
0
Idk how to script but i need it so when i press tab the leaderboard is visible and when i press it again it goes away until i press tab again. alsome495 -21 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago
press.Tab:connect(function()

This is not how keyboard input works.

if Main.Visible = false then

You should use == in your if statement, or not Main.Visible.

game.StarterGui.LeaderBoard.Main.Visible = true

PlayerGui is what you want.

local LeaderBoard.Main

This is not how local variables work.

0
ok so i am still confused can u put that script together and make it a full script alsome495 -21 — 7y
Ad

Answer this question