Look i am making this game all on my own because nobody will help so please give me this little bit of support.
How would i make a Keybinding Gui script? So like Press H for help
Look i am making this game all on my own because nobody will help so please give me this little bit of support.
How would i make a Keybinding Gui script? So like Press H for help
Okay, assuming that it is a frame that you want to be opened, you would do this. Just make a Local Script inside the frame and paste this in it.
p = game.Players.LocalPlayer
mouse = p:GetMouse()
mouse.KeyDown:connect(function(key)
if key == "h" then
if script.Parent.Visible == true then
script.Parent.Visible = false
else
script.Parent.Visible = true
end
end
end)
Well, to detect when a player pushes a button, you would use KeyDown as well as GetMouse to get the Player's mouse.. Example:
mouse = game.Players.LocalPlayer:GetMouse()
local function onKeyDown( key )
if key:lower() == "h" then
-- Your Code
end
mouse.KeyDown:connect(onKeyDown)
Yours is also good for tools as well if i could i would accept both
This discussion is preserved as it was. New answers, comments, and votes are closed.
3 comments
Thank you have saved me alot of time
Np
IF you need a script to run an animation on click or on a keydown just make another question and PM me on roblox.