ContextActionService only working for me?

My game works fine in studio when testing it on a local server with two players, but in-game, some of the controls don’t work for other players. The controls always work for me, but twice, one with my brother and one with a friend, they could only move up and down. Here is a clip of my code. Any thoughts?

local isMovingLeft = false
local isMovingRight = false
local isMovingUp = false
local isMovingDown = false

local function handleMovements()
    while true do
		
		if isMovingLeft and isMovingUp then
			
		elseif isMovingLeft and isMovingDown then
			
		elseif isMovingRight and isMovingUp then
		
		elseif isMovingRight and isMovingDown then
			
		elseif isMovingLeft then
		
		elseif isMovingDown then
			
		elseif isMovingRight then	
			
		elseif isMovingUp then
			
        end
	end
end
spawn(handleMovements)

local function handleLeftMovement(actionName, inputState, inputObject)
	if inputState == Enum.UserInputState.Begin then
		isMovingLeft = true
	else
		isMovingLeft = false	
	end
end

local function handleRightMovement(actionName, inputState, inputObject)
	if inputState == Enum.UserInputState.Begin then
		isMovingRight = true
	else
		isMovingRight = false	
	end
end

local function handleUpMovement(actionName, inputState, inputObject)
	if inputState == Enum.UserInputState.Begin then
		isMovingUp = true
	else
		isMovingUp = false	
	end
end

local function handleDownMovement(actionName, inputState, inputObject)
	if inputState == Enum.UserInputState.Begin then
		isMovingDown = true
	else
		isMovingDown = false	
	end
end

ContextActionService:BindAction("moveUpAction", handleUpMovement, false, Enum.KeyCode.W)
ContextActionService:BindAction("moveLeftAction", handleLeftMovement, false, Enum.KeyCode.A)
ContextActionService:BindAction("moveDownAction", handleDownMovement, false, Enum.KeyCode.S)
ContextActionService:BindAction("moveRightAction", handleRightMovement, false, Enum.KeyCode.D)