I want to make a gui that shows the rules and that etc. But im very confused on this. I know the keydown function (which I cant show at the moment because im using a phone.). But what script should I use for the --code part?
This should be in a LocalScript:
wait() local player = game.Players.LocalPlayer local mouse = player:GetMouse() local gui = script.Parent --Wherever your GUI is located (This is just for the example) mouse.KeyDown:connect(function(key) if key:lower() == "q" --Just an example key, change to whatever you want if gui.Visible == true then gui.Visible = false --Makes GUI invisible else gui.Visible = true --Makes GUI visible end end end)
Likewise, if you want to use a special key such as "F4", you'd have to use:
if key:byte() == 29 then --Code end
You can find an entire list of the codes for special characters here:
http://wiki.roblox.com/index.php?title=Taking_keyboard_input