So I had P binded to bring up a menu and it worked. But then I added another where N brings up a different menu and P stopped working. I tried googling it and found out that I had the same function name for both, so I fixed that but only one key works still?
local player = script.Parent.Parent local ContextActionService = game:GetService("ContextActionService") function onKeyPress(actionName, userInputState, inputObject) if userInputState == Enum.UserInputState.Begin then player.PlayerGui.Menu.Enabled = not player.PlayerGui.Menu.Enabled end end game.ContextActionService:BindAction("keyPress", onKeyPress, false, Enum.KeyCode.P) function onDevPress(actionName, userInputState, inputObject) if userInputState == Enum.UserInputState.Begin then if player.Name == "CrispyBrix" or "CowsBell" then player.PlayerGui.DevMen.Enabled = not player.PlayerGui.DevMen.Enabled end end end game.ContextActionService:BindAction("keyPress", onDevPress, false, Enum.KeyCode.N)
No errors or anything just the P does not work. Any help is appreciated :)
if player.Name == "CrispyBrix" or player.Name == "CowsBell" then