Hello currently making a quick emotes menu local script
local function onTauntKeyCode(input)
local one, two, three, four, five, six = table.unpack(animationsTable)
for _, key in buttonList.TauntKey do
if key == input.KeyCode and not fired then
print('opening menu')
UserInputService.InputBegan:Connect(function(input)
if input.KeyCode == buttonList.TauntListKeys[1] then
print(input.KeyCode)
end
end)
fired = true
elseif key == input.KeyCode and fired then
fired = false
print('closing menu')
end
end
end
of course this doesn’t work but basically I want to check for new inputs once the player presses G and then IF the input is correct or the player presses G the “menu” closes.
local function onTauntKeyCode(input)
print("Function Called")
local one, two, three, four, five, six = table.unpack(animationsTable)
print(buttonList)
for _, key in buttonList.TauntKey do
print(key)
if key == input.KeyCode and not fired then
print('opening menu')
UserInputService.InputBegan:Connect(function(input)
if input.KeyCode == buttonList.TauntListKeys[1] then
print(input.KeyCode)
end
end)
fired = true
elseif key == input.KeyCode and fired then
fired = false
print('closing menu')
end
end
end
local function onTauntKeyCode(input)
--print("Function Called")
local one, two, three, four, five, six = table.unpack(animationsTable)
--print(buttonList)
for _, key in buttonList.TauntKey do
--print(key)
if key == input.KeyCode and not fired then
fired = true
print('opening menu')
UserInputService.InputBegan:Connect(function(input)
for _, key in buttonList.TauntListKeys do
if key == input.KeyCode and fired then
fired = false
print(input.KeyCode)
end
end
end)
elseif key == input.KeyCode and fired then
fired = false
print('closing menu')
end
end
end
this is what I have at the moment which works, idk if this is best…