function ControlModule.GetMoveVector(Y)if Y.activeController then return Y.activeController:GetMoveVector()end return Vector3.new(0,0,0)end function ControlModule.GetActiveController(Y)return Y.activeController end function ControlModule.EnableActiveControlModule(Y)if Y.activeControlModule==ClickToMove then Y.activeController:Enable(true,Players.LocalPlayer.DevComputerMovementMode==Enum.DevComputerMovementMode.UserChoice,Y.touchJumpController)elseif Y.touchControlFrame then Y.activeController:Enable(true,Y.touchControlFrame)else Y.activeController:Enable(true)end end function ControlModule.Enable(s,Y)if not s.activeController then return end if Y==nil then Y=true end if Y then s:EnableActiveControlModule()else s:Disable()end end

function ControlModule:GetMoveVector()
	if self.activeController then
		return self.activeController:GetMoveVector()
	end
	return Vector3.new(0,0,0)
end

function ControlModule:GetActiveController()
	return self.activeController
end

function ControlModule:EnableActiveControlModule()
	if self.activeControlModule == ClickToMove then
		-- For ClickToMove, when it is the player's choice, we also enable the full keyboard controls.
		-- When the developer is forcing click to move, the most keyboard controls (WASD) are not available, only jump.
		self.activeController:Enable(
			true,
			Players.LocalPlayer.DevComputerMovementMode == Enum.DevComputerMovementMode.UserChoice,
			self.touchJumpController
		)
	elseif self.touchControlFrame then
		self.activeController:Enable(true, self.touchControlFrame)
	else
		self.activeController:Enable(true)
	end
end

function ControlModule:Enable(enable)
	if not self.activeController then
		return
	end

	if enable == nil then
		enable = true
	end
	if enable then
		self:EnableActiveControlModule()
	else
		self:Disable()
	end
end
