So basically I have a script that handles attacks. BUT one of the attacks runs even when I use another one. Anyone know why?
if uis:IsKeyDown(Enum.KeyCode.X) and uis:IsKeyDown(Enum.KeyCode.W) then
print('Keys X and W pressed')
attackEvent:FireServer('UpAttack')
elseif uis:IsKeyDown(Enum.KeyCode.X) and uis:IsKeyDown(Enum.KeyCode.S) then
attackEvent:FireServer('DownAttack')
elseif uis:IsKeyDown(Enum.KeyCode.X) and not uis:IsKeyDown(Enum.KeyCode.S) and not uis:IsKeyDown(Enum.KeyCode.W) then -- this is what is running. Its not suppose to when the S key is down or the W key
attackEvent:FireServer('ForwardAttack')
elseif uis:IsKeyDown(Enum.KeyCode.G) then
elseif uis:IsKeyDown(Enum.KeyCode.Z) then
elseif uis:IsKeyDown(Enum.KeyCode.R) then
end