Open Menu on Keypress

  1. What do you want to achieve?
    I want to make open menu on keyPress by pressing T, but it doesn’t working

  2. What is the issue?
    Im write this code but it not working

local UIS = game:GetService("UserInputService")
function onKeyPress(input, gameProcessed)
	if gameProcessed then
		if input.KeyCode == Enum.KeyCode.B then
			if script.Parent.Visible == false then
				script.Parent.Visible = true
			else
				script.Parent.Visible = false
			end
		end
	end
end
UIS.InputBegan:Connect(onKeyPress)

Source of code and frame
sorce

Turn that if gameProcessed then into if not gameProcessed then

omg you’re right its working god damn

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.