I was wonder how i would get something to happen when 2 keys are pressed here is what i have tried:
game.Players.LocalPlayer:GetMouse().KeyDown:connect(function(key) if key:byte() == 32 then if string.lower(key) == "e" then print("well done or fired") end
end end)
Button1Pressed = false Button2Pressed = false Mouse = game.Players.LocalPlayer:GetMouse() Mouse.KeyDown:connect(function(Key) if Key == "g" then Button1Pressed = true elseif Key == "h" then Button2Pressed = true end print(Button1Pressed,Button2Pressed) end) Mouse.KeyUp:connect(function(Key) if Key == "g" then Button1Pressed = false elseif Key == "h" then Button2Pressed = false end print(Button1Pressed,Button2Pressed) end)
This code sets it up where if two keys are pressed then both booleans return true. You can simply make a conditional to check for them.