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

How can I make a Gui show when I press a certain key?

Asked by 10 years ago

I am clueless in scripting so dont think im dumb for not knowing how to do this I just need this for my game.

2 answers

Log in to vote
2
Answered by
Bman8765 270 Moderation Voter
10 years ago

I personally think reading the wiki is the best way to learn more about something as many talented people give a full explanation of each script.

Right here is the wiki link to taking keyboard input http://wiki.roblox.com/index.php/Taking_keyboard_input

Just use what you learn there to make a function that turns Your gui visible to true.

there is honestly a bunch of options on how to do it so you pick what best fits you!

Also if you're new to roblox lua you should probably watch some tutorials as they are very useful!

0
Ok, ill take a look at the wiki thanks AWESOMEnoob3 3 — 10y
Ad
Log in to vote
0
Answered by 10 years ago

This might work,

game.Players.PlayerAdded:connect(function(mouse)
mouse.KeyDown:connect(function(key)
if key == "the key you want the player to press"  then
game.Players.LocalPlayer.PlayerGui.GuiName.FrameOrWhateverName.Visible = true
end
end)
end)

EDIT: Put the script in workspace

Answer this question