#[Solved] Press a Key to keep a GUI open/closed

36 messages · Page 1 of 1 (latest)

runic cypress
#

I was trying to make that if Tab was pressed the settings would open but with this structure I need to keep the Key pressed. I tried with only InputBegan and with InputChanged but nothing

river karmaBOT
#

studio** You are now Level 8! **studio

bold skiff
#

that does not work

#

just reverse the not to the end

#

so it would look likelua if Input.KeyCode == Enum.KeyCode.Tab and not p then settingsFrame.Visible = not settingsFrame.Visible end

#

and put that on the InputBegan

#

so it should look likelua function UpdateFrame(Input) if Input.KeyCode == Enum.KeyCode.Tab then settingsFrame.Visible = not settingsFrame.Visible end end uis:InputBegan:Connect(UpdateFrame)

runic cypress
#

I can't put 2 things before and after the not, right?

bold skiff
#

u still can

#
task.sort(function(a,b)return a.Value < b.Value end)```
runic cypress
#

uhh

#

i'm not understanding

bold skiff
#

thats a example to do something like for example a Server LeaderBoard for top players

#

but thats for sorting the 100 < 1000 then it sorts whats the highest to lowest
or its the opposite

runic cypress
#

so how do I call the functions unlockMouse() and lockMouse() ?

normal lily
#

Just add it in bruh

runic cypress
normal lily
#

Bruh

#

Not there

runic cypress
#

where

normal lily
#

Okay do me a favour

#

Put your cursor after then

#

Then hit return

#

Now you can see the actual scope of the if statement

runic cypress
#

I made it like that

#

and it works

#

let my try your method

normal lily
#

It’s just to see it more easier

#

Putting everything on one line makes it unreadable

runic cypress
#

I don't have a cursor statement

normal lily
#

Bruh

#

Cursor I mean by text cursor

#

Just never mind

runic cypress
#

sorry man i'm not understanding

#

but thanks for helping