Pressing 3 binded keys resets other keys

Hello.
Right now, I have 3 keys that all do something (A obviously for moving left, D for moving right, and C key for a blocking manoeuvre.)

When I hold down all 3 keys at once, this happens:


(In the video I gradually press keys until my block suddenly gets cancelled, and when I let go of either A or D it messes up and re-does my block mechanic)

Here is the code:

(Server, Block Move Manager) Parented Under ServerScriptService

task.wait()
local module=require(game.ServerScriptService.Game)

local rs=game:GetService("ReplicatedStorage")
local remotes=rs:FindFirstChild("Remotes")

local moves=remotes:FindFirstChild("Moves")

local BlockInfoList={}
moves.Block.OnServerEvent:Connect(function(player,character,enable)
	print(enable,"GO!")
	if player and character and character:FindFirstChild("Humanoid") and character:FindFirstChild("Humanoid").Health>0 and character:GetAttribute("Block")~=nil and module.AnimationList[player.Name]~=nil then
		if enable==true and character:GetAttribute("Block")==false then
			BlockInfoList[player.Name]=false
			character:FindFirstChild("Humanoid").WalkSpeed=0
			character:FindFirstChild("Humanoid").JumpPower=0
			
			local animlist=module.AnimationList[player.Name]
			animlist.BlockIntro:Play(0.0000001)
			animlist.Block:Play(0.0000001)
			
			animlist.BlockIntro.Stopped:Wait()
			if BlockInfoList[player.Name]==false then character:SetAttribute("Block",true) end
			
		elseif enable==false then
			character:FindFirstChild("Humanoid").WalkSpeed=19
			character:FindFirstChild("Humanoid").JumpPower=38
			
			local animlist=module.AnimationList[player.Name]
			animlist.Block:Stop(0.0000001)
			
			character:SetAttribute("Block",false)
			if BlockInfoList[player.Name]~=nil and BlockInfoList[player.Name]==false then BlockInfoList[player.Name]=true animlist.BlockIntro:Stop(0.0000001) end
		end
	end
end)

(Client, Move Input Detector) Parented Under StarterPlayerCharacter

game.UserInputService.InputBegan:Connect(function(inp,gpe)
	if not gpe and inp.KeyCode==Enum.KeyCode.C then
		game.ReplicatedStorage.Remotes.Moves.Block:FireServer(script.Parent,true)
	end
end)

game.UserInputService.InputEnded:Connect(function(inp,gpe)
	if not gpe and inp.KeyCode==Enum.KeyCode.C then
		game.ReplicatedStorage.Remotes.Moves.Block:FireServer(script.Parent,false)
	end
end)

Any help is appreciated!

IDK is this work I can’t test (Sorry :face_holding_back_tears:)
So… try this
(In ServerScript)

task.wait()
local module=require(game.ServerScriptService.Game)

local rs=game:GetService("ReplicatedStorage")
local remotes=rs:FindFirstChild("Remotes")

local moves=remotes:FindFirstChild("Moves")

local BlockInfoList={}
moves.Block.OnServerEvent:Connect(function(player,character,enable)
	print(enable,"GO!")
	if player and character and character:FindFirstChild("Humanoid") and character:FindFirstChild("Humanoid").Health>0 and character:GetAttribute("Block")~=nil and module.AnimationList[player.Name]~=nil then
		character:SetAttribute("Block",nil)
		BlockInfoList[player.Name]=enable
		local animlist=module.AnimationList[player.Name]
		if enable==true then
			character:FindFirstChild("Humanoid").WalkSpeed=0
			character:FindFirstChild("Humanoid").JumpPower=0

			animlist.BlockIntro:Play(0.0000001)
			animlist.Block:Play(0.0000001)
			animlist.BlockIntro.Stopped:Wait()
			
		elseif enable==false then
			character:FindFirstChild("Humanoid").WalkSpeed=19
			character:FindFirstChild("Humanoid").JumpPower=38
			
			animlist.Block:Stop(0.0000001)
		end
		character:SetAttribute("Block",enable)
	end
end)

P.S. Your game is so cool :open_mouth:

Unfortunately, the result of this script ended up having nothing change when trying to press the block key.

Also lots of functions that were made to cancel the block when let go instantly were caught in the crossfire of your simplification of the script, making it even more broken.

P.S. Thanks for the compliment!